本文整理汇总了C#中HS.Business.SCommBB类的典型用法代码示例。如果您正苦于以下问题:C# SCommBB类的具体用法?C# SCommBB怎么用?C# SCommBB使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SCommBB类属于HS.Business命名空间,在下文中一共展示了SCommBB类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: BindGrid
/// <summary>
/// 绑定Grid
/// </summary>
protected void BindGrid()
{
SCommBB commBB = new SCommBB();
DataSet ds = new DataSet();
try
{
string arriveBillNo = "", FinanceBillNo = "", Material = "", custno = "";
arriveBillNo = this.tbArriveBillNo.Text.Trim();
FinanceBillNo = this.tbFinanceBillNo.Text.Trim();
Material = this.tbMaterial.Text.Trim();
custno = this.tbCustNO.Text.Trim();
if (!Checkbox.Checked)
{
ds = commBB.Query("exec Proc_GetSapInStockArriveBillListNew '" + arriveBillNo + "','" + FinanceBillNo + "','" + Material + "','" + custno + "'");//查询的是没有同步的
}
else
{
//[Proc_GetSapInStockArriveBillListNewAreadyInstocked] 这个是获取已经入库的
ds = commBB.Query("exec Proc_GetSapInStockArriveBillListNewAreadyInstocked '" + arriveBillNo + "','" + FinanceBillNo + "','" + Material + "','" + custno + "'");//查询的是没有同步的
}
this.grid.DataSource = ds.Tables[0];
this.grid.DataBind();
//赋值记录条数、页面总数
this.Label3.Text = ds.Tables[0].Rows.Count.ToString();
this.Label2.Text = this.grid.PageCount.ToString();
this.currPage.Text = (this.grid.PageIndex + 1).ToString();
}
finally
{
commBB.Dispose();
}
}
开发者ID:wanghouxian2015,项目名称:GMWJGit,代码行数:38,代码来源:SapInStock.aspx.cs
示例2: BindGrid
/// <summary>
/// 绑定库存汇总列表
/// </summary>
protected void BindGrid()
{
SCommBB commBB = new SCommBB();
try
{
DataSet ds = new DataSet();
ds = commBB.Query("exec proc_StockTotalReportNew '" + this.ddlWare.SelectedValue + "','"
+ this.ddlWareLocater.SelectedValue + "','" + this.tbFinanceBillNo.Text.Trim().Replace("'", "''").Trim() + "','"
+ this.tbMaterial.Text.Trim().Replace("'", "''").Trim() + "','" + this.ddlIsOutStocking.SelectedValue + "','" + this.ddlCheckResult.SelectedValue + "'");
this.grid.DataSource = ds.Tables[0];
this.grid.DataBind();
//赋值记录条数、页面总数
this.Label3.Text = ds.Tables[0].Rows.Count.ToString();
this.Label2.Text = this.grid.PageCount.ToString();
this.currPage.Text = (this.grid.PageIndex + 1).ToString();
}
finally
{
commBB.Dispose();
}
}
开发者ID:wanghouxian2015,项目名称:GMWJGit,代码行数:28,代码来源:StockReport.aspx.cs
示例3: BindGrid
protected void BindGrid()
{
SCommBB commBB = new SCommBB();
DataSet ds = new DataSet();
try
{
string arriveBillNo = "", FinanceBillNo = "", Material = "", custno = "";
arriveBillNo = this.tbarrivebillNo.Text.ToString();
FinanceBillNo = "";
Material = this.tbMaterial.Text.Trim();
ds = commBB.Query("exec [Proc_GetSapOtherInStockArriveBillListNew] '" + arriveBillNo + "','" + FinanceBillNo + "','" + Material + "','" + custno + "'");
this.grid.DataSource = ds.Tables[0];
this.grid.DataBind();
//赋值记录条数、页面总数
this.Label3.Text = ds.Tables[0].Rows.Count.ToString();
this.Label2.Text = this.grid.PageCount.ToString();
this.currPage.Text = (this.grid.PageIndex + 1).ToString();
}
finally
{
commBB.Dispose();
}
}
开发者ID:wanghouxian2015,项目名称:GMWJGit,代码行数:27,代码来源:OtherOutInSAPIN.aspx.cs
示例4: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
if (Request.Params["functionNo"] != null && Request.Params["functionNo"].Trim() != "")
{
this.FunctionNo = Request.Params["functionNo"];
}
}
if (this.SET_SQL.Value != "")
{
this.SET_SQL.Value = this.SET_SQL.Value.Substring(0, this.SET_SQL.Value.Length - 1);
SCommBB commBB = new SCommBB();
try
{
string[] updateSqls = this.SET_SQL.Value.Split(';');
foreach (string updateSql in updateSqls)
{
commBB.ExecuteSql(updateSql);
}
}
finally
{
commBB.Dispose();
}
this.SET_SQL.Value = "";
}
this.ShowPullInfo(this.FunctionNo);
}
开发者ID:wanghouxian2015,项目名称:GMWJGit,代码行数:31,代码来源:WFunctionStepPull.aspx.cs
示例5: BindGrid
/// <summary>
/// 绑定Grid
/// </summary>
protected void BindGrid()
{
SCommBB commBB = new SCommBB();
DataSet ds = new DataSet();
try
{
//ds = commBB.Query("exec Proc_GetSapOutStockSaleBillList '" + this.tbAbsEntry.Text.Trim().Replace("'", "''")
// + "','" + this.tbSaleBillNo.Text.Trim().Replace("'", "''") + "','"
// + this.tbMaterial.Text.Trim().Replace("'", "''") + "'");
string AbsEntry = "";
string SaleBillNo = this.tbSaleBillNo.Text.Trim();
string material = this.tbMaterial.Text.Trim();
string invoiceNo = this.tbinvoiceNo.Text;
string custNo = this.tbcustNo.Text;
//ds = commBB.Query("exec [dbo].[Proc_ newGetSapOutStockSaleBillList] '" + this.tbAbsEntry.Text.Trim().Replace("'", "''")
// + "','" + this.tbSaleBillNo.Text.Trim().Replace("'", "''") + "','"
// + "','" + this.tbMaterial.Text.Trim().Replace("'", "''") + "','"
// + this.tbinvoiceNo.Text.Trim().Replace("'", "''") + "'");
ds = commBB.Query("exec [dbo].[Proc_GetSapOutStockSaleBillListNew] '" + AbsEntry + "','" + SaleBillNo + "','" + material + "','" + invoiceNo + "','"+custNo+"'");
this.grid.DataSource = ds.Tables[0];
this.grid.DataBind();
//赋值记录条数、页面总数
this.Label3.Text = ds.Tables[0].Rows.Count.ToString();
this.Label2.Text = this.grid.PageCount.ToString();
this.currPage.Text = (this.grid.PageIndex + 1).ToString();
}
finally
{
commBB.Dispose();
}
}
开发者ID:wanghouxian2015,项目名称:GMWJGit,代码行数:37,代码来源:SapOutStock.aspx.cs
示例6: ShowInfo
/// <summary>
/// չʾ����
/// </summary>
/// <param name="id">��¼Id</param>
private void ShowInfo(int id)
{
SFileBB fileBB = new SFileBB();
LMessageBB messageBB = new LMessageBB();
vLMessageData model = new vLMessageData();
try
{
model = messageBB.GetVModel(id);
this.title.Text = model.title;
this.content.Text = model.content;
this.fileId.Text = fileBB.GetDownBatchFileNm(model.fileId);
this.sort.Text = model.sortNm;
this.author.Text = model.author;
}
finally
{
fileBB.Dispose();
messageBB.Dispose();
}
//�����Ѷ��˴�
SCommBB commBB = new SCommBB();
try
{
string strSql = "select count(distinct empId) from LMessageReaded where messageId=" + id.ToString();
this.readedEmpCount.Text = commBB.ExecuteScalar(strSql).ToString();
}
finally
{
commBB.Dispose();
}
}
开发者ID:wanghouxian2015,项目名称:GMWJGit,代码行数:35,代码来源:LMessageShow.aspx.cs
示例7: btnCommit_Click
protected void btnCommit_Click(object sender, EventArgs e)
{
//判断上传控件是否为空
if (this.FileInsertImg.PostedFile.FileName == "")
{
this.ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert(\"请首先选择一个图片文件!\");", true);
return;
}
this.btnCommit.Enabled = false;
//判断文件格式(0无限制、1图片)
FileInfo file = new FileInfo(this.FileInsertImg.PostedFile.FileName);
string extension = file.Extension;
SCommBB commBB = new SCommBB();
try
{
//查看文件格式是否存在与系统表“图片文件格式”中
if (commBB.Query("select 1 from SImageFileType where fileExtension='" + extension + "'").Tables[0].Rows.Count == 0)
{
this.ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert(\"本次附件上传要求为图片格式文件,请重新选择!\");", true);
this.btnCommit.Enabled = true;
return;
}
}
finally
{
commBB.Dispose();
}
string fileId = "";
string insertImgPath = "";
if (this.FileId == "")
{
//获取文件名称
string fileNm = DateTime.Now.ToString("yyyyMMddHHmmss");
Random ro = new Random();
fileNm += ro.Next(1000, 9999).ToString() + extension;
//上传文件到指定目录
this.FileInsertImg.PostedFile.SaveAs(System.AppDomain.CurrentDomain.SetupInformation.ApplicationBase + "\\Images\\UpImg\\" + fileNm);
string level = "";
for (int i = 0; i < Convert.ToInt32(DirectLevel); i++)
{
level += "../";
}
insertImgPath = level + "Images/UpImg/" + fileNm;
}
else
{
SFileData fileData = this.UpImg(this.FileInsertImg.PostedFile);
fileId = fileData.fileId.ToString();
insertImgPath = fileData.preFileNm;
}
this.btnCommit.Enabled = true;
this.ClientScript.RegisterStartupScript(this.GetType(), "returnParent", "returnParent('" + fileId + "','" + insertImgPath + "');", true);
}
开发者ID:wanghouxian2015,项目名称:GMWJGit,代码行数:58,代码来源:SImageUp.aspx.cs
示例8: btnInsertImg_Click
/// <summary>
/// ���ͼƬ
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnInsertImg_Click(object sender, EventArgs e)
{
//�ж��ϴ��ؼ��Ƿ�Ϊ��
if (this.FileInsertImg.PostedFile.FileName == "")
{
this.ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert(\"������ѡ��һ��ͼƬ�ļ�!\");", true);
return;
}
this.btnInsertImg.Enabled = false;
//�ж��ļ���ʽ��0�����ơ�1ͼƬ��
FileInfo file = new FileInfo(this.FileInsertImg.PostedFile.FileName);
string extension = file.Extension;
SCommBB commBB = new SCommBB();
try
{
//�鿴�ļ���ʽ�Ƿ������ϵͳ���ͼƬ�ļ���ʽ����
if (commBB.Query("select 1 from SImageFileType where fileExtension='" + extension + "'").Tables[0].Rows.Count == 0)
{
this.ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert(\"���θ����ϴ�Ҫ��ΪͼƬ��ʽ�ļ���������ѡ��!\");", true);
this.btnInsertImg.Enabled = true;
return;
}
}
finally
{
commBB.Dispose();
}
//��ȡ�ļ�����
string fileNm = DateTime.Now.ToString("yyyyMMddHHmmss");
Random ro = new Random();
fileNm += ro.Next(1000, 9999).ToString() + extension;
//�ϴ��ļ���ָ��Ŀ¼
this.FileInsertImg.PostedFile.SaveAs(System.AppDomain.CurrentDomain.SetupInformation.ApplicationBase + "\\Images\\UpImg\\" + fileNm);
//�ж�ͼƬ�ߴ磬�����ʾΪ400/300
System.Drawing.Image image = System.Drawing.Image.FromFile(System.AppDomain.CurrentDomain.SetupInformation.ApplicationBase + "\\Images\\UpImg\\" + fileNm);
if (image.Width > 400)
{
this.content.Value += "<img alt=\"\" src=\"../../../Images/UpImg/" + fileNm + "\" width=\"400\" height=\"" + 400 * image.Height / image.Width + "\" />";
}
else if (image.Height > 300)
{
this.content.Value += "<img alt=\"\" src=\"../../../Images/UpImg/" + fileNm + "\" width=\"" + 300 * image.Width / image.Height + "\" height=\"300\" />";
}
else
{
this.content.Value += "<img alt=\"\" src=\"../../../Images/UpImg/" + fileNm + "\" />";
}
this.btnInsertImg.Enabled = true;
}
开发者ID:wanghouxian2015,项目名称:GMWJGit,代码行数:59,代码来源:LMessage.aspx.cs
示例9: btnSave_Click
protected void btnSave_Click(object sender, EventArgs e)
{
PRolePermissionsData rolePermissionsData = new PRolePermissionsData();
SCommBB commBB = new SCommBB();
PRolePermissionsBB rolePermissionsBB = new PRolePermissionsBB();
try
{
//删除当前角色所有权限
rolePermissionsBB.DeleteRecordByRole(this.RoleId, 2);
//保存权限
string strPermissions = "";
CheckBox checkBox = new CheckBox();
foreach (DataListItem item in this.DataList1.Items)
{
//获取ItemoNo
Label label = (Label)item.FindControl("itemNo");
string itemNo = label.Text;
if (itemNo.IndexOf('-') >= 0)
{
itemNo = itemNo.Substring(itemNo.LastIndexOf('-') + 1);
}
foreach (System.Web.UI.Control control in item.Controls)
{
if (control.GetType() == checkBox.GetType())
{
if (((CheckBox)control).Checked == true)
{
strPermissions += itemNo + "," + ((CheckBox)control).ToolTip + ",0|";
}
}
}
}
//保存权限
commBB.ExecuteSql("exec sys_BatchSavePermissions " + this.RoleId.ToString() + ",'" + strPermissions.Remove(strPermissions.Length - 1) + "'");
}
catch (Exception ex)
{
this.ClientScript.RegisterStartupScript(this.GetType(), "ShowErr", "ShowErr(\"" + Server.UrlEncode(ex.Message) + "\",3);", true);
return;
}
finally
{
commBB.Dispose();
rolePermissionsBB.Dispose();
}
this.ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('保存成功!');", true);
}
开发者ID:wanghouxian2015,项目名称:GMWJGit,代码行数:50,代码来源:PRolePermissions.aspx.cs
示例10: BindGrid
private void BindGrid()
{
string billNo = this.tbBillNo.Text.ToString();
string material = this.tbMaterial.Text.ToString();
string saleBillNo = this.tbsaleBillNo.Text.ToString();
SCommBB commBB = new SCommBB();
try
{
this.gridSaleBill.DataSource = commBB.Query("exec [dbo].[pro_GetoutSaleDetailShow] '" + material + "','" + billNo + "','" + saleBillNo + "'").Tables[0];
this.gridSaleBill.DataBind();
}
catch { }
finally
{
commBB.Dispose();
}
}
开发者ID:wanghouxian2015,项目名称:GMWJGit,代码行数:17,代码来源:outStockBillShow.aspx.cs
示例11: BindGrid
private void BindGrid()
{
SCommBB commbb = new SCommBB();
try
{
string material = this.tbMaterial.Text.ToString();
string arriveBillNo = this.tbBillNo.Text.ToString();
string financeBillNo = this.tbfinanceBillNo.Text.ToString();
this.gridSaleBill.DataSource = commbb.Query(" exec [dbo].[pro_GetinSaleDetailShow] '" + material + "','" + arriveBillNo + "','" + financeBillNo + "'").Tables[0];
this.gridSaleBill.DataBind();
}
catch { }
finally
{
commbb.Dispose();
}
}
开发者ID:wanghouxian2015,项目名称:GMWJGit,代码行数:18,代码来源:inStockBillShow.aspx.cs
示例12: ShowInfo
private void ShowInfo()
{
string id = Request.Params["id"];
string sql = " select stockUpBillNo,saleBillNo ,materialNo from vCStockUpDetail where id ='"+id+"'";
SCommBB commBB = new SCommBB();
try
{
DataTable dt = commBB.Query(sql).Tables[0];
for (int i = 0; i < dt.Rows.Count; i++)
{
this.tbBillNo.Text = dt.Rows[i][0].ToString();
this.tbsaleBillNo.Text = dt.Rows[i][1].ToString();
this.tbMaterial.Text = dt.Rows[i][2].ToString();
}
}
catch { }
finally
{
commBB.Dispose();
}
}
开发者ID:wanghouxian2015,项目名称:GMWJGit,代码行数:21,代码来源:outStockBillShow.aspx.cs
示例13: btnData_Click
/// <summary>
/// 获取SAP数据
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnData_Click(object sender, EventArgs e)
{
SCommBB commBB = new SCommBB();
try
{
//获取SAP到货单、销售订单
commBB.ExecuteSql("exec up_SAP_GetNewData");
this.ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('同步SAP到货\\拣货数据成功!');", true);
}
catch (Exception ex)
{
this.ClientScript.RegisterStartupScript(this.GetType(), "ShowErr", "ShowErr(\"" + Server.UrlEncode(ex.Message) + "\",3);", true);
return;
}
finally
{
commBB.Dispose();
}
}
开发者ID:wanghouxian2015,项目名称:GMWJGit,代码行数:26,代码来源:SAPDataPhase.aspx.cs
示例14: btnChangeBox_Click
/// <summary>
/// 修改关联的托盘号
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnChangeBox_Click(object sender, EventArgs e)
{
if (txtBoxNo.Text.ToString() == "")
{
this.ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert(\"箱号不能为空!\");", true);
return;
}
if (txtPalletNewNo.Text.ToString()=="")
{
this.ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert(\"托盘号不能为空!\");", true);
return;
}
if (txtBoxNo.Text.ToString().ToUpper().Substring(0, 1) != "X" || txtPalletNewNo.Text.ToString().ToUpper().Substring(0,1)!="T")
{
this.ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert(\"箱号或是托盘号不正确!\");", true);
return;
}
SCommBB comm = new SCommBB();
try
{
comm.ExecuteSql("Update BarrangeBillBox set PalletNo = '" + txtPalletNewNo.Text.Trim().ToUpper() + "' where boxNo = '" + txtBoxNo.Text.Trim().ToUpper() + "'");
this.ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert(\"更新托盘号成功 箱号 " + txtBoxNo.Text.Trim().ToUpper() + " 更新后的托盘是" + txtPalletNewNo.Text.Trim().ToUpper() + "!\");", true);
}
catch (Exception ee)
{
this.ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert(\"更新托盘号失败 " + ee.Message + "!\");", true);
}
finally
{
txtBoxNo.Text = "";
txtPalletNewNo.Text = "";
comm.Dispose();
}
}
开发者ID:wanghouxian2015,项目名称:GMWJGit,代码行数:45,代码来源:TestCreateTask.aspx.cs
示例15: BindGrid
/// <summary>
/// 绑定集货区库位使用情况列表
/// </summary>
protected void BindGrid()
{
SCommBB commBB = new SCommBB();
try
{
DataSet ds = new DataSet();
ds = commBB.Query("exec Proc_GetJHQWareInfo '" + this.tbCustNo.Text.Trim().Replace("'", "''") + "'");
this.grid.DataSource = ds.Tables[0];
this.grid.DataBind();
//赋值记录条数、页面总数
this.Label3.Text = ds.Tables[0].Rows.Count.ToString();
this.Label2.Text = this.grid.PageCount.ToString();
this.currPage.Text = (this.grid.PageIndex + 1).ToString();
}
finally
{
commBB.Dispose();
}
}
开发者ID:wanghouxian2015,项目名称:GMWJGit,代码行数:26,代码来源:JHQWareReport.aspx.cs
示例16: BindGrid
protected void BindGrid()
{
SCommBB commBB = new SCommBB();
try
{
string strStartDt = "";
string strEndDt = "";
//开始入库日期
if (!string.IsNullOrEmpty(this.tbStartDt.Text.Trim()))
{
strStartDt = this.tbStartDt.Text.Trim().ToUpper();
}
//截止入库日期
if (!string.IsNullOrEmpty(this.tbEndDt.Text.Trim()))
{
strEndDt = this.tbEndDt.Text.Trim().ToUpper();
}
string material = this.lblmaterialNo.Text.ToString();
DataSet ds = new DataSet();
ds = commBB.Query(" exec [dbo].[up_inventory_OutIn_list] '" + material + "','" + strStartDt + "','" + strEndDt + "'");
this.gridSaleBill.DataSource = ds.Tables[0];
this.gridSaleBill.DataBind();
this.Label1.Text = ds.Tables[0].Rows.Count.ToString();
this.Label4.Text = this.gridSaleBill.PageCount.ToString();
this.TextBox1.Text = (this.gridSaleBill.PageIndex + 1).ToString();
}
catch { }
finally
{
commBB.Dispose();
}
}
开发者ID:wanghouxian2015,项目名称:GMWJGit,代码行数:36,代码来源:UstockOutINDetail.aspx.cs
示例17: btnCommit_Click
/// <summary>
/// 提交
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnCommit_Click(object sender, EventArgs e)
{
bool retChecked = false;
BBackBillBB backBillBB = new BBackBillBB();
try
{
foreach (GridViewRow gvrow in this.grid.Rows)
{
CheckBox chkId = (CheckBox)gvrow.FindControl("chkId");
if (chkId.Checked == true)
{
int id = int.Parse(chkId.ValidationGroup);
BBackBillData backBillModel = backBillBB.GetModel(Convert.ToInt32(id));
if (backBillModel.instantState != "03")
{
this.ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert(\"请选择一条未提交退货单记录!\");", true);
return;
}
else
{
retChecked = true;
backBillModel.commitDt = System.DateTime.Now.ToString();
backBillModel.commitEmpId = this.currentUser.empId;
backBillModel.instantState = "02";
backBillBB.ModifyRecord(backBillModel);
}
DataTable dtDetail = new DataTable();
BBackDetailBB backDetailBB = new BBackDetailBB();
//获取退货明细数据源
dtDetail = backDetailBB.GetList("backBillNo='" + backBillModel.backBillNo + "'").Tables[0];
string commadPallet = "";
for (int i = 0; i < dtDetail.Rows.Count; i++)
{
if (i == dtDetail.Rows.Count - 1)
{
commadPallet += "BoxNO = '" + dtDetail.Rows[i]["BoxNo"].ToString().ToUpper().Trim() + "'";
}
else
{
commadPallet += "BoxNO = '" + dtDetail.Rows[i]["BoxNo"].ToString().ToUpper().Trim() + "' or ";
}
}
string command = "select distinct palletNo from BArrangeBillBox where " + commadPallet;//获取订单下的托盘号码
SCommBB bb = new SCommBB();
DataTable dt = bb.Query(command).Tables[0];
bb.Dispose();
//BForkliftTaskBC bforkTaskBC = new BForkliftTaskBC();
//for (int j = 0; j < dt.Rows.Count; j++)
//{
// bforkTaskBC.SaveForkliftTaskWithTHD(dt.Rows[j][0].ToString(), "YCQ", "N01.01", "30", this.currentUser.empId,backBillModel.backBillNo);
//}
}
}
}
catch (Exception ex)
{
this.ClientScript.RegisterStartupScript(this.GetType(), "ShowErr", "ShowErr(\"" + Server.UrlEncode(ex.Message) + "\",3);", true);
return;
}
finally
{
backBillBB.Dispose();
}
if (retChecked)
{
this.BindGrid();
}
}
开发者ID:wanghouxian2015,项目名称:GMWJGit,代码行数:79,代码来源:BBackBillListWareHouse.aspx.cs
示例18: btnUp_Click
protected void btnUp_Click(object sender, EventArgs e)
{
this.lblMsg.Text = "";
this.isUpSucess = false;
if (this.SingleLimit == "1" && this.selectedFiles.Items.Count > 0)
{
this.ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert(\"本次文件上传只允许选择单个文件!\");", true);
return;
}
int userId = this.currentUser.empId;
int fileID = 0;
string preFileNm = "";
SFileData model = new SFileData();
SSpaceBC spaceBC = new SSpaceBC();
try
{
//判断文件格式(0无限制、1图片)
switch (this.FileType)
{
case "0":
break;
case "1":
FileInfo file = new FileInfo(this.File1.PostedFile.FileName);
string extension = file.Extension;
//查看文件格式是否存在与系统表“图片文件格式”中
SCommBB commBB = new SCommBB();
try
{
if (commBB.Query("select 1 from SImageFileType where fileExtension='" + extension + "'").Tables[0].Rows.Count == 0)
{
this.ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert(\"本次附件上传要求为图片格式文件,请重新选择!\");", true);
return;
}
}
finally
{
commBB.Dispose();
}
break;
default:
break;
}
fileID = spaceBC.UploadFile(model, this.File1.PostedFile, userId, this.FileType == "1");
if (fileID != 0)
{
preFileNm = model.preFileNm;
}
ListItem item = new ListItem();
item.Text = preFileNm;
item.Value = fileID.ToString();
this.selectedFiles.Items.Add(item);
this.isUpSucess = true;
}
catch (Exception ex)
{
this.ClientScript.RegisterStartupScript(this.GetType(), "ShowErr", "ShowErr(\"" + Server.UrlEncode(ex.Message) + "\",1);", true);
return;
}
finally
{
spaceBC.Dispose();
}
}
开发者ID:wanghouxian2015,项目名称:GMWJGit,代码行数:69,代码来源:SFileUp.aspx.cs
示例19: ShowPullInfo
private void ShowPullInfo(string functionNo)
{
StringBuilder vmlStr = new StringBuilder();
SCommBB commBB = new SCommBB();
WFunctionStepBB functionStepBB = new WFunctionStepBB();
DataSet ds = new DataSet();
try
{
//������ù�����������������ͬ�������������������
int stepLevels = 0;
int maxStepSeq = 0;
int stepIntervalX = 0;
int stepIntervalY = 0;
ds = commBB.Query("select max(seq) from WFunctionStep where functionNo='" + functionNo + "'");
if (ds.Tables[0].Rows.Count > 0 && ds.Tables[0].Rows[0][0] != DBNull.Value)
{
maxStepSeq = Convert.ToInt32(ds.Tables[0].Rows[0][0]);
}
ds = commBB.Query("select distinct stepNo from WFunctionStep where functionNo='" + functionNo + "'");
stepLevels = ds.Tables[0].Rows.Count;
//����Y��������
if (stepLevels > 1)
{
stepIntervalY = 400 / (stepLevels - 1);
}
int roundrectId = 1;
int currCenterRoundrectId = 0;
int preCenterRoundrectId = 0;
//��ʼ��ͼ������
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
{
DataRow row = ds.Tables[0].Rows[i];
DataSet levelDs = new DataSet();
levelDs = functionStepBB.GetVList("functionNo='" + functionNo + "' and stepNo=" + row["stepNo"].ToString());
for (int j = 0; j < levelDs.Tables[0].Rows.Count; j++)
{
DataRow levelRow = levelDs.Tables[0].Rows[j];
string stepId = levelRow["id"].ToString();
string stepNm = levelRow["stepNm"].ToString();
string stepNo = levelRow["stepNo"].ToString();
string seq = levelRow["seq"].ToString();
string nodeType = "";
string fillcolor = "";
int coordinateX;
int coordinateY;
//��ǰ��������������
int currLevelSteps = levelDs.Tables[0].Rows.Count;
//���㵱ǰ������X������
if (currLevelSteps > 1)
{
stepIntervalX = 400 / (currLevelSteps - 1);
}
if (roundrectId == 1)
{
nodeType = "start";
fillcolor = "#00EE00";
}
else if (i == ds.Tables[0].Rows.Count - 1 && j == levelDs.Tables[0].Rows.Count - 1)
{
nodeType = "end";
fillcolor = "#F4A8BD";
}
else
{
fillcolor = "#EEEEEE";
}
//����X����
if (Convert.ToInt32(levelRow["coordinateX"]) != 0)
{
coordinateX = Convert.ToInt32(levelRow["coordinateX"]);
}
else
{
if (currLevelSteps > 1)
{
coordinateX = 30 + stepIntervalX * j;
}
else
{
coordinateX = 230;
}
}
//����Y����
if (Convert.ToInt32(levelRow["coordinateY"]) != 0)
{
coordinateY = Convert.ToInt32(levelRow["coordinateY"]);
}
else
{
//.........这里部分代码省略.........
开发者ID:wanghouxian2015,项目名称:GMWJGit,代码行数:101,代码来源:WFunctionStepPull.aspx.cs
示例20: ShowInfo
/// <summary>
/// 展示数据
/// </summary>
/// <param name="id">记录Id</param>
private void ShowInfo(int id)
{
BCheckBillBB checkBillBB = new BCheckBillBB();
SCommBB commBB = new SCommBB();
try
{
vBCheckBillData model = new vBCheckBillData();
DataSet ds = new DataSet();
string strSQL = "";
model = checkBillBB.GetVModel(id);
this.lbCheckBillNo.Text = model.checkBillNo;
this.tbArriveBillNo.Text = model.arriveBillNo;
this.tbFinanceBillNo.Text = model.financeBillNo;
this.hidMaterialNo.Value = model.materialNo;
this.tbMaterialDesc.Text = model.materialDesc;
this.tbCheckMark.Text = model.checkMark;
//查找到货单明细ID
strSQL = "select id,num from BArriveDetail where arriveBillNo='" + model.arriveBillNo
+ "' and financeBillNo='" + model.financeBillNo + "' and materialNo='" + model.materialNo + "'";
ds = commBB.Query(strSQL);
if (ds != null && ds.Tables[0].Rows.Count > 0)
{
this.hidArriveDetailID.Value = ds.Tables[0].Rows[0]["id"].ToString();
this.tbNum.Text = ds.Tables[0].Rows[0]["num"].ToString();
}
this.BindMateriel2();//绑定物料对应检测标准明细表
}
finally
{
checkBillBB.Dispose();
}
}
开发者ID:wanghouxian2015,项目名称:GMWJGit,代码行数:40,代码来源:BCheckBill.aspx.cs
注:本文中的HS.Business.SCommBB类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论