private int PrintCount() { var cmd = new SqlCommand("select top 1 isnull(iPrintNum,1) from SS_Box where cGuid=@cGuid"); cmd.Parameters.AddWithValue("@cGuid", _cGuid); var wf = new WmsFunction(BaseStructure.WmsCon); var ciPrintNum = wf.ReturnFirstSingle(cmd); int iPrintNum; return(int.TryParse(ciPrintNum, out iPrintNum) ? iPrintNum : 1); }
private bool GetLotMgr() { var wf = new WmsFunction(BaseStructure.WmsCon); var bOutAllCmd = new SqlCommand("select isnull(bLotMgr,0) bLotMgr from IT_Product where cInvCode=@cInvCode"); bOutAllCmd.Parameters.AddWithValue("@cInvCode", lblcInvCode.Text); bool bLotMgr; var cLotMgr = wf.ReturnFirstSingle(bOutAllCmd); if (bool.TryParse(cLotMgr, out bLotMgr)) { return(bLotMgr); } return(false); }
private void tsbtnAdd_Click(object sender, EventArgs e) { var wf = new WmsFunction(BaseStructure.WmsCon); var lotCmd = new SqlCommand("GenerateOrderNumber") { CommandType = CommandType.StoredProcedure }; lotCmd.Parameters.AddWithValue("@cPrelix", "YFTF"); lotCmd.Parameters.AddWithValue("@cType", "销售退货"); lotCmd.Parameters.AddWithValue("@cOperator", BaseStructure.LoginName); lblcOrderNumber.Text = wf.ReturnFirstSingle(lotCmd); dataProductMain.SS_DeliveryReturn.Rows.Clear(); txtcBarCode.Enabled = true; txtcBarCode.Text = ""; }