| | |
| | | static long hinterId; |
| | | string billCode = "3301"; |
| | | public SCM.WMSWeb.WebService1 oWeb = new SCM.WMSWeb.WebService1(); |
| | | |
| | | |
| | | public Gy_GroupEmpEdit(long interId) |
| | | { |
| | | InitializeComponent(); |
| | |
| | | try |
| | | { |
| | | |
| | | if (txtHSupID.Tag == null) |
| | | { |
| | | MessageBox.Show("è¯·éæ©çç»", "æç¤º", MessageBoxButtons.OK, MessageBoxIcon.Error); |
| | | return; |
| | | } |
| | | var groupId = int.Parse(txtHSupID.Tag.ToString()); |
| | | //if (txtHSupID.Tag == null) |
| | | //{ |
| | | // MessageBox.Show("è¯·éæ©çç»", "æç¤º", MessageBoxButtons.OK, MessageBoxIcon.Error); |
| | | // return; |
| | | //} |
| | | var groupId =0; |
| | | if (hinterId == 0) |
| | | { |
| | | var hyear = DateTime.Now.Year; |
| | | var HPeriode = DateTime.Now.Month; |
| | | hinterId = ClsPub1.CreateBillID(billCode, ref ClsPub.sExeReturnInfo); |
| | | var addSql = "insert into Gy_GroupEmpListMain(HInterID,HYear,HPeriod,HBillType,HBillNo,HDate,HBillStatus,HRemark,HGroupID)values(" + hinterId + "," + hyear + "," + HPeriode + ",'" + billCode + "','" + billNo + "','" + hdate + "',1,'" + hreamrk + "'," + hgroupId + ")"; |
| | | var addSql = "insert into Gy_GroupEmpListMain(HInterID,HYear,HPeriod,HBillType,HBillNo,HDate,HBillStatus,HRemark,HGroupID)values(" + hinterId + "," + hyear + "," + HPeriode + ",'" + billCode + "','" + billNo + "','" + hdate + "',1,'" + hreamrk + "',0)"; |
| | | oWeb.getRunProc(addSql, ref Pub_Class.ClsPub.sExeReturnInfo); |
| | | AddEmpSub(hinterId); |
| | | MessageBox.Show("æ°å¢æå", "æç¤º", MessageBoxButtons.OK, MessageBoxIcon.Information); |
| | | } |
| | | else |
| | | { |
| | | var updateSql = "update Gy_GroupEmpListMain set HRemark='"+hreamrk+ "',HGroupID='"+hgroupId+ "' where HInterID="+hinterId; |
| | | var updateSql = "update Gy_GroupEmpListMain set HRemark='"+hreamrk+ "',HGroupID=0 where HInterID="+hinterId; |
| | | oWeb.getRunProc(updateSql, ref Pub_Class.ClsPub.sExeReturnInfo); |
| | | var deleteSql = "delete Gy_GroupEmpListSub where HInterID=" + hinterId; |
| | | oWeb.getRunProc(deleteSql, ref Pub_Class.ClsPub.sExeReturnInfo); |
| | |
| | | private void initGrid() |
| | | { |
| | | grdMain.RowCount = 30; |
| | | grdMain.ColumnCount = 6; //æ»åæ° |
| | | grdMain.ColumnCount = 8; //æ»åæ° |
| | | ClsPub1.initGridFst(grdMain, this.Name); |
| | | grdMain.Columns[1].HeaderText = "ç¼å·"; |
| | | grdMain.Columns[2].HeaderText = "èåID"; |
| | | grdMain.Columns[3].HeaderText = "èåå§å"; |
| | | grdMain.Columns[4].HeaderText = "èåç¼å·"; |
| | | grdMain.Columns[5].HeaderText = "夿³¨"; |
| | | grdMain.Columns[6].HeaderText = "çç»ID"; |
| | | grdMain.Columns[7].HeaderText = "çç»"; |
| | | |
| | | ////// |
| | | ////æ ¼å¼å éèå |
| | | grdMain.Columns[0].Visible = false; |
| | | grdMain.Columns[6].Visible = false; |
| | | //grdMain.Columns[1].Visible = false; |
| | | |
| | | |
| | |
| | | return; |
| | | } |
| | | DataSet oDs2 = new DataSet(); |
| | | SCM.ClsIF_Employee_View empl = new ClsIF_Employee_View(); |
| | | if (empl.RefreshView(" ")) |
| | | if (sCol==2) |
| | | { |
| | | foreach (DataGridViewRow item in grdMain.Rows) |
| | | SCM.ClsIF_Employee_View empl = new ClsIF_Employee_View(); |
| | | if (empl.RefreshView(" ")) |
| | | { |
| | | if (item.Cells[2].Value != null && item.Cells[2].Value.ToString() == empl.oModel.HItemID.ToString()) |
| | | foreach (DataGridViewRow item in grdMain.Rows) |
| | | { |
| | | if (item.Cells[2].Value != null && item.Cells[2].Value.ToString() == empl.oModel.HItemID.ToString()) |
| | | { |
| | | |
| | | MessageBox.Show("该èåå·²ç»åå¨", "æç¤º", MessageBoxButtons.OK, MessageBoxIcon.Error); |
| | | return; |
| | | MessageBox.Show("该èåå·²ç»åå¨", "æç¤º", MessageBoxButtons.OK, MessageBoxIcon.Error); |
| | | return; |
| | | } |
| | | } |
| | | grdMain.Rows[sRow].Cells[2].Value = empl.oModel.HItemID.ToString(); |
| | | grdMain.Rows[sRow].Cells[3].Value = empl.oModel.HName; |
| | | grdMain.Rows[sRow].Cells[4].Value = empl.oModel.HNumber; |
| | | } |
| | | grdMain.Rows[sRow].Cells[2].Value = empl.oModel.HItemID.ToString(); |
| | | grdMain.Rows[sRow].Cells[3].Value = empl.oModel.HName; |
| | | grdMain.Rows[sRow].Cells[4].Value = empl.oModel.HNumber; |
| | | } |
| | | else if (sCol == 7) |
| | | { |
| | | SCM.ClsIF_Group_View g = new ClsIF_Group_View(); |
| | | if (g.RefreshView(" ")) |
| | | { |
| | | grdMain.Rows[sRow].Cells[6].Value = g.oModel.HItemID.ToString(); |
| | | grdMain.Rows[sRow].Cells[7].Value = g.oModel.HName; |
| | | } |
| | | else |
| | | { |
| | | grdMain.Rows[sRow].Cells[6].Value = ""; |
| | | grdMain.Rows[sRow].Cells[7].Value = ""; |
| | | } |
| | | } |
| | | |
| | | oSumGrid.EditStatus = true; |
| | | |
| | | |
| | |
| | | continue; |
| | | } |
| | | var remark = item.Cells[5].EditedFormattedValue==null?"":item.Cells[5].EditedFormattedValue.ToString(); |
| | | var sql = "insert into Gy_GroupEmpListSub(HInterID,HEmpID,HRemark) values (" + hinterId + "," + item.Cells[2].Value + ",'" + remark + "')"; |
| | | var sql = "insert into Gy_GroupEmpListSub(HInterID,HEmpID,HGroupID,HRemark) values (" + hinterId + "," + item.Cells[2].Value + "," + item.Cells[6].Value + ",'" + remark + "')"; |
| | | oWeb.getRunProc(sql, ref Pub_Class.ClsPub.sExeReturnInfo); |
| | | } |
| | | } |
| | | public void SetGridValue() |
| | | { |
| | | var sql = "select a.HEmpID èåID,b.HName èåå§å,b.HNumber èåç¼å·,a.HRemark 夿³¨ from Gy_GroupEmpListSub a left join Gy_Employee b on a.HEmpID = b.HItemID where a.HInterID =" + hinterId; |
| | | var sql = "select a.HEmpID èåID,b.HName èåå§å,b.HNumber èåç¼å·,g.HitemID HgroupID,g.Hname HgroupName,a.HRemark 夿³¨ from Gy_GroupEmpListSub a left join Gy_Employee b on a.HEmpID = b.HItemID left join gy_group g on a.hgroupid=g.hitemid where a.HInterID =" + hinterId; |
| | | DataSet DSet = oWeb.getDataSetBySQL(sql, "Gy_GroupEmpListSub", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | int a = 0; |
| | | foreach (DataRow item in DSet.Tables[0].Rows) |
| | |
| | | grdMain.Rows[a].Cells[3].Value = item["èåå§å"].ToString(); |
| | | grdMain.Rows[a].Cells[4].Value = item["èåç¼å·"].ToString(); |
| | | grdMain.Rows[a].Cells[5].Value = item["夿³¨"].ToString(); |
| | | grdMain.Rows[a].Cells[6].Value = item["HgroupID"].ToString(); |
| | | grdMain.Rows[a].Cells[7].Value = item["HgroupName"].ToString(); |
| | | a++; |
| | | } |
| | | } |
| | |
| | | //å°è£åæ¶é´åå éå®è®¢å è£åæ¶é´å å®é
æèæ°é
|
| | | if (HSourceBillType == "ç产订å") //éå®è£å
|
| | | {
|
| | | oWeb.getRunProc("EXEC h_p_IFCLD_DataBackToSeOrderCutTime_New " + HSourceInterID.ToString() + "," + HSourceEntryID.ToString() + ",'" + HSourceBillNo + "'," + HRelDiffQty.ToString() + ",'" + ClsPub.CurUserName + "'" , ref DBUtility.ClsPub.sExeReturnInfo);
|
| | | |
| | | if (HSourceInterID > 100000000 && HSourceInterID < 200000000)
|
| | | {
|
| | | oWeb.getRunProc("EXEC h_p_IFCLD_DataBackToSeOrderCutTime_New " + HSourceInterID.ToString() + "," + HSourceEntryID.ToString() + ",'" + HSourceBillNo + "'," + HRelDiffQty.ToString() + ",'" + ClsPub.CurUserName + "'", ref DBUtility.ClsPub.sExeReturnInfo);
|
| | | }
|
| | | else if(HSourceInterID > 200000000 && HSourceInterID < 300000000)
|
| | | {
|
| | | oWeb.getRunProc("EXEC h_p_IFCLD_DataBackToOtherOutCutTime_New " + HSourceInterID.ToString() + "," + HSourceEntryID.ToString() + ",'" + HSourceBillNo + "'," + HRelDiffQty.ToString() + ",'" + ClsPub.CurUserName + "'", ref DBUtility.ClsPub.sExeReturnInfo);
|
| | |
|
| | | }
|
| | | else if (HSourceInterID > 300000000 && HSourceInterID < 400000000)
|
| | | {
|
| | | oWeb.getRunProc("EXEC h_p_IFCLD_DataBackToPICKMTRLCutTime_New " + HSourceInterID.ToString() + "," + HSourceEntryID.ToString() + ",'" + HSourceBillNo + "'," + HRelDiffQty.ToString() + ",'" + ClsPub.CurUserName + "'", ref DBUtility.ClsPub.sExeReturnInfo);
|
| | |
|
| | | }
|
| | | else if (HSourceInterID > 400000000 && HSourceInterID < 500000000)
|
| | | {
|
| | | oWeb.getRunProc("EXEC h_p_IFCLD_DataBackToMoveStockCutTime_New " + HSourceInterID.ToString() + "," + HSourceEntryID.ToString() + ",'" + HSourceBillNo + "'," + HRelDiffQty.ToString() + ",'" + ClsPub.CurUserName + "'", ref DBUtility.ClsPub.sExeReturnInfo);
|
| | |
|
| | | }
|
| | | else
|
| | | {
|
| | | //
|
| | | }
|
| | | }
|
| | | ////å½å®å·¥æ è®°å¾ä¸æ¶ 并䏿¶ çäº§æ±æ¥æ£éªæ¶
|
| | | //if (HSourceBillType == "çäº§æ±æ¥å" && chkFinishFlag.Checked) //æ£éªåå
|
| | |
| | | + ",'" + HMaterName + "','" + HMaterModel + "','" + HPinfan + "'," + HAuxPropID.ToString() + ",'" + HMTONo + "',"+ omodel.HInterID + ")"; |
| | | oWeb.getRunProc(sSQLMul, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | |
| | | //å°å
è£
æ¶é´åå éå®è®¢å |
| | | oWeb.getRunProc("EXEC h_p_IFCLD_DataBackToSeOrderPickTime_New " + HSourceInterID.ToString() + "," + HSourceEntryID.ToString() + ",'" + HSourceBillNo + "'," + omodel.HInterID.ToString() + ",'" + ClsPub.CurUserName + "'", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | |
| | | |
| | | //å°å
è£
æ¶é´åå éå®è®¢å |
| | | if (HSourceInterID > 100000000 && HSourceInterID < 200000000) |
| | | { |
| | | oWeb.getRunProc("EXEC h_p_IFCLD_DataBackToSeOrderPickTime_New " + HSourceInterID.ToString() + "," + HSourceEntryID.ToString() + ",'" + HSourceBillNo + "'," + omodel.HInterID.ToString() + ",'" + ClsPub.CurUserName + "'", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | } |
| | | else if (HSourceInterID > 200000000 && HSourceInterID < 300000000) |
| | | { |
| | | oWeb.getRunProc("EXEC h_p_IFCLD_DataBackToOtherOutPickTime_New " + HSourceInterID.ToString() + "," + HSourceEntryID.ToString() + ",'" + HSourceBillNo + "'," + omodel.HInterID.ToString() + ",'" + ClsPub.CurUserName + "'", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | } |
| | | else if (HSourceInterID > 300000000 && HSourceInterID < 400000000) |
| | | { |
| | | oWeb.getRunProc("EXEC h_p_IFCLD_DataBackToPICKMTRLPickTime_New " + HSourceInterID.ToString() + "," + HSourceEntryID.ToString() + ",'" + HSourceBillNo + "'," + omodel.HInterID.ToString() + ",'" + ClsPub.CurUserName + "'", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | } |
| | | else if (HSourceInterID > 400000000 && HSourceInterID < 500000000) |
| | | { |
| | | oWeb.getRunProc("EXEC h_p_IFCLD_DataBackToMoveStockPickTime_New " + HSourceInterID.ToString() + "," + HSourceEntryID.ToString() + ",'" + HSourceBillNo + "'," + omodel.HInterID.ToString() + ",'" + ClsPub.CurUserName + "'", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | } |
| | | else |
| | | { |
| | | // |
| | | } |
| | | //å·æ°çé¢ |
| | | DisBillEntryList_Webs(); |
| | | //DisplaySub(); |