| | |
| | | |
| | | DataSet DSet; |
| | | |
| | | DSet = oCn.RunProcReturn("Select * from gy_czygl Where czymc='" + HUserName + "'", "gy_czygl", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | DSet = oCn.RunProcReturn("Select HEmpID from gy_czygl Where czymc='" + HUserName + "'", "gy_czygl", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | |
| | | if (DSet == null) |
| | | //if (DSet == null|| DSet.Tables[0].Rows.Count == 0) |
| | |
| | | { |
| | | |
| | | |
| | | txtHEmpID.Tag = DBUtility.ClsPub.isInt(DSet.Tables[0].Rows[0]["HEmpID"]); |
| | | txtHEmpID.Tag = DBUtility.ClsPub.isStrNull(DSet.Tables[0].Rows[0]["HEmpID"]); |
| | | } |
| | | else |
| | | { |
| | |
| | | { |
| | | if (HZXQty > DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells["鐢熶骇璁㈠崟鏁伴噺"].Value)) |
| | | { |
| | | //HZXQty = HZXQty - DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells["鐢熶骇璁㈠崟鏁伴噺"].Value); |
| | | //grdMain.Rows[i].Cells["鏈鏁伴噺"].Value = DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells["鐢熶骇璁㈠崟鏁伴噺"].Value); |
| | | MessageBox.Show("璇风偣鍑昏秴棰濈敓浜ф寜閽敓鎴愭潯鐮侊紒"); |
| | | return; |
| | | HZXQty = HZXQty - DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells["鐢熶骇璁㈠崟鏁伴噺"].Value); |
| | | grdMain.Rows[i].Cells["鏈鏁伴噺"].Value = DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells["鐢熶骇璁㈠崟鏁伴噺"].Value); |
| | | |
| | | //MessageBox.Show("璇风偣鍑昏秴棰濈敓浜ф寜閽敓鎴愭潯鐮侊紒"); |
| | | //return; |
| | | } |
| | | else |
| | | { |
| | | //grdMain.Rows[i].Cells["鏈鏁伴噺"].Value = HZXQty; |
| | | grdMain.Rows[i].Cells["鏈鏁伴噺"].Value = HZXQty; |
| | | // |
| | | |
| | | HZXQty = HZXQty - DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells["鐢熶骇璁㈠崟鏁伴噺"].Value); |
| | | grdMain.Rows[i].Cells["鏈鏁伴噺"].Value = DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells["鐢熶骇璁㈠崟鏁伴噺"].Value); |
| | | //HZXQty = HZXQty - DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells["鐢熶骇璁㈠崟鏁伴噺"].Value); |
| | | //grdMain.Rows[i].Cells["鏈鏁伴噺"].Value = DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells["鐢熶骇璁㈠崟鏁伴噺"].Value); |
| | | } |
| | | } |
| | | else |
| | |
| | | private void cmdHSourceID_Click(object sender, EventArgs e) |
| | | { |
| | | Int64 HEmpID = 0; |
| | | HEmpID = ClsPub.isLong(txtHEmpID.Tag); |
| | | HEmpID = Convert.ToInt64(txtHEmpID.Tag); |
| | | |
| | | |
| | | //MessageBox.Show(ClsPub.isStrNull(HEmpID)); |
| | | //string HEmpName = ""; |
| | | //HEmpName = ClsPub.isStrNull(txtHEmpID.Text); |
| | | |
| | | DAL.ClsGy_Source_View oSource = new DAL.ClsGy_Source_View(); |
| | | if (HEmpID != 0) |
| | | { |
| | | if (oSource.GetInfoByID(HEmpID)) |
| | | if (oSource.GetInfoByID_AoBang(HEmpID)) |
| | | { |
| | | this.txtHSourceID.Text = oSource.oModel.HName; |
| | | this.txtHSourceID.Tag = oSource.oModel.HItemID.ToString(); |
| | |
| | | grdList.DataSource = null; |
| | | grdSub.DataSource = null; |
| | | grdMain.DataSource = null; |
| | | txtHEmpID.Tag = 0; |
| | | } |
| | | |
| | | private void button2_Click(object sender, EventArgs e) |