本文整理汇总了C#中HS.Business.SCommBB.Query方法的典型用法代码示例。如果您正苦于以下问题:C# SCommBB.Query方法的具体用法?C# SCommBB.Query怎么用?C# SCommBB.Query使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HS.Business.SCommBB
的用法示例。
在下文中一共展示了SCommBB.Query方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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();
}
}
示例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();
}
}
示例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();
}
}
示例4: 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();
}
}
示例5: 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);
}
示例6: 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;
}
示例7: 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();
}
}
示例8: 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();
}
}
示例9: 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();
}
}
示例10: 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();
}
}
示例11: GetAllowTallyStockPallet_DE
public DataTable GetAllowTallyStockPallet_DE()
{
SCommBB commBB = new SCommBB();
try
{
DataTable dt = new DataTable();
dt = commBB.Query("exec Proc_GetAllowTallyStockPallet_DE").Tables[0];
return dt;
}
finally
{
commBB.Dispose();
}
}
示例12: 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();
}
}
示例13: BindDetailTable
/// <summary>
/// 绑定检测明细
/// </summary>
/// <param name="NewOrOld">new/old 分别表示 走检验标准结构,走单据结构。如果传空值,请确认DtResult不为空</param>
protected void BindDetailTable(string strNewOrOld)
{
#region 初始化检测明细
if (this.DtResult == null)//第一次初始化模板,分两种情况。新增和修改。
{
SCommBB commBB = new SCommBB();
try
{
string strSQL = "";
if (strNewOrOld == "new")//以标准为模板,走结构。
{
strSQL = "exec Proc_InitCheckDetailAdd '" + this.hidMaterialNo.Value + "','" + this.hidArriveDetailID.Value + "'";
}
else if (strNewOrOld == "old")//以订单内容为主,走结构。一般是修改状态进来的单据。
{
strSQL = "exec Proc_InitCheckDetailModify '" + this.IdValue.ToString() + "'";
}
DataSet ds = commBB.Query(strSQL);
if (ds != null && ds.Tables.Count > 0)
{
this.DtResult = ds.Tables[0];
this.DtResult.Columns.Add(new DataColumn("rowId", typeof(string)));
this.DtResult.Columns.Add(new DataColumn("isdel", typeof(string)));
foreach (DataRow dr in this.DtResult.Rows)
{
dr["rowId"] = Guid.NewGuid().ToString();
dr["isdel"] = "0";
}
}
}
catch (Exception ex)
{
this.ClientScript.RegisterStartupScript(this.GetType(), "ShowErr", "ShowErr(\"" + Server.UrlEncode(ex.Message) + "\",4);", true);
return;
}
finally
{
commBB.Dispose();
}
}
DataView dv = this.DtResult.DefaultView;
dv.RowFilter = "isdel=0";
this.grid.DataSource = dv;
this.grid.DataBind();
#endregion 初始化检测明细
}
示例14: GetArrangeBillDetail_Group
public DataTable GetArrangeBillDetail_Group(string strArriveBillNo, string strFinanceBillNos, string strPalletIndexs)
{
SCommBB commBB = new SCommBB();
try
{
DataTable dt = new DataTable();
StringBuilder strSql = new StringBuilder();
strSql.Append("select arrangeBillNo,arriveBillNo,materialNo,materialDesc,");
strSql.Append("sum(boxNum) as boxNum,sum(consignBoxNum) as consignBoxNum ");
strSql.Append("from dbo.vBArrangeBillDetail ");
if (strFinanceBillNos != "")
{
strSql.Append("where arriveBillNo='" + strArriveBillNo
+ "' and '," + strFinanceBillNos + ",' like '%,'+financeBillNo+',%' and palletIndex in ("
+ strPalletIndexs + ") ");
}
else
{
strSql.Append("where arriveBillNo='" + strArriveBillNo + "' and palletIndex in (" + strPalletIndexs + ") ");
}
strSql.Append("group by arrangeBillNo,arriveBillNo,materialNo,materialDesc");
dt = commBB.Query(strSql.ToString()).Tables[0];
return dt;
}
finally
{
commBB.Dispose();
}
}
示例15: UpImg
private SFileData UpImg(HttpPostedFile postedFile)
{
//判断上传控件是否为空
if (postedFile.FileName == "")
{
this.ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert(\"请首先选择一个图片文件!\");", true);
return null;
}
SFileData model = new SFileData();
SSpaceBC spaceBC = new SSpaceBC();
try
{
//判断文件格式(0无限制、1图片)
FileInfo file = new FileInfo(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 null;
}
}
finally
{
commBB.Dispose();
}
int fileId = spaceBC.UploadFile(model, postedFile, "upFile", this.currentUser.empId, false);
model.fileId = fileId;
return model;
}
finally
{
spaceBC.Dispose();
}
}