本文整理汇总了C#中HS.Business.SCommBB.ExecuteScalar方法的典型用法代码示例。如果您正苦于以下问题:C# SCommBB.ExecuteScalar方法的具体用法?C# SCommBB.ExecuteScalar怎么用?C# SCommBB.ExecuteScalar使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HS.Business.SCommBB
的用法示例。
在下文中一共展示了SCommBB.ExecuteScalar方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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();
}
}
示例2: FinishTSArriveDetail
public void FinishTSArriveDetail(int arriveDetailId)
{
BArriveDetailBB arriveDetailBB = new BArriveDetailBB();
SCommBB commBB = new SCommBB();
try
{
BArriveDetailData arriveDetailModel = new BArriveDetailData();
object obj = null;
string strArriveBillNo = "", strFinanceBillNo = "", strMaterialNo = "";
arriveDetailModel = arriveDetailBB.GetModel(arriveDetailId);
arriveDetailModel.isFinishReceive = true;//收货完成
arriveDetailBB.ModifyRecord(arriveDetailModel);
//更改到货单明细的排托数量
strArriveBillNo = arriveDetailModel.arriveBillNo;
strFinanceBillNo = arriveDetailModel.financeBillNo;
strMaterialNo = arriveDetailModel.materialNo;
obj = commBB.ExecuteScalar("select count(1) from dbo.BArrangeBillBox where arriveBillNo='"
+ strArriveBillNo + "' and financeBillNo='" + strFinanceBillNo + "' and materialNo='" + strMaterialNo + "'");
if (obj != null)
{
commBB.ExecuteSql("update dbo.BarriveDetail set boxNum=" + obj.ToString() + " where id=" + arriveDetailId.ToString());
}
}
finally
{
arriveDetailBB.Dispose();
commBB.Dispose();
}
}
示例3: GetWareLocatorCheckMatertial
public string GetWareLocatorCheckMatertial(string checkNO, string wareLocatorNo,string material)
{
SCommBB commBB = new SCommBB();
object obj = commBB.ExecuteScalar("Select distinct WareLocatorNo from UStockCheckDetail_Joey where StockCheckBillNo = '" + checkNO + "' and WareLocatorNo = '" + wareLocatorNo + "' and MaterialNo ='"+material+"'");
if (obj == null)
{
return "";
}
else
{
return obj.ToString();
}
}
示例4: GetfirstSingleWeight
public string GetfirstSingleWeight(string material)
{
SCommBB commBB = new SCommBB();
try
{
string singleWeight = "";
object obj = commBB.ExecuteScalar("SELECT U_StanWiht FROM LMaterial WHERE materialNo ='" + material + "'").ToString();
if (obj != null)
{
singleWeight = obj.ToString();
}
else
{
singleWeight = "0";
}
return singleWeight;
}
finally
{
commBB.Dispose();
}
}
示例5: GetcustNo
public string GetcustNo(string palletNo)
{
SCommBB commBB = new SCommBB();
string custNO = "";
string command = @"exec [dbo].[pro_GetcustNo] '" + palletNo + "'";
try
{
object obj = commBB.ExecuteScalar(command);
if (obj != null)
{
custNO = obj.ToString();
}
}
catch
{
custNO = "";
}
finally
{
commBB.Dispose();
}
return custNO;
}
示例6: btnDelete_Click
/// <summary>
/// 删除备货单
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnDelete_Click(object sender, EventArgs e)
{
foreach (GridViewRow gvrow in this.grid.Rows)
{
CheckBox chkId = (CheckBox)gvrow.FindControl("chkId");
if (chkId.Checked == true)
{
string id = this.grid.DataKeys[gvrow.RowIndex].Values["id"].ToString();
CStockUpBillBB billBB = new CStockUpBillBB();
CStockUpBillData data = billBB.GetModel(Convert.ToInt32(id));
string stockUpBillNo = data.stockUpBillNo;//获取要删除的备货单号
SCommBB commBB = new SCommBB();
object returnValue =commBB.ExecuteScalar(@"select top 1 stockUpBillNo from CPickOutPlan where stockUpBillNo = '"+stockUpBillNo+"' and instantState<>'01'");
if (returnValue != null)
{
this.ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert(\"备货单 " + stockUpBillNo + " 不允许删除因为已经开始执行!\");", true);
return;
}
else
{
try
{
commBB.ExecuteSql("Exec [DeleteStockUpBillNo] '" + stockUpBillNo + "'");
this.ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert(\"备货单 " + stockUpBillNo + " 删除错误删除成功!\");", true);
}
catch (Exception error)
{
this.ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert(\"备货单 " + stockUpBillNo + " 删除错误" + error.Message + "!\");", true);
}
finally
{
commBB.Dispose();
}
}
}
}
}