Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
| | |
| | | private void SetCmbAccount(string sServer)//cmbä¸è®¾ç½®å¸å¥ //Lock |
| | | { |
| | | ClsCNmaster oCn = new ClsCNmaster(); |
| | | DataSet DS ; |
| | | DataSet DS; |
| | | try |
| | | { |
| | | DS = oCn.RunProcReturn("select * from HDSystem_DataBases where YNuse=1 ", "HDSystem_DataBases", ref ClsPub.sExeReturnInfo); |
| | |
| | | { |
| | | cmbAccount.SelectedIndex = 0; |
| | | ClsIni oIni = new ClsIni(); |
| | | string sNumber = ClsIni.ReadIni("Erp", "DataBaseNumber",DBUtility.ClsPub.AppPath + @"/HXErp.ini"); |
| | | string sNumber = ClsIni.ReadIni("Erp", "DataBaseNumber", DBUtility.ClsPub.AppPath + @"/HXErp.ini"); |
| | | for (int j = 0; j < cmbAccount.Items.Count; j++) |
| | | { |
| | | if (sNumber.Trim() == cmbAccount.Items[j].ToString().Trim()) |
| | |
| | | |
| | | private bool CheckServer()//æ£æ¥æå¡å¨åæ£ç¡®æ§ //Lock |
| | | { |
| | | ClsCN oCn=new ClsCN(); |
| | | ClsCN oCn = new ClsCN(); |
| | | if (oCn.CheckOpen()) |
| | | { |
| | | lblStatus.Text = "æå¡å¨è¿æ¥æå"; |
| | |
| | | string sDataBase_K3 = ""; |
| | | string sDataBase_K32 = ""; |
| | | string sDataBase_K33 = ""; |
| | | sDataBase = oCn.GetDataBase(cmbAccount.Text.Trim(),ref sDataBase_K3); |
| | | sDataBase = oCn.GetDataBase(cmbAccount.Text.Trim(), ref sDataBase_K3); |
| | | ClsIni oIni = new ClsIni(); |
| | | ClsIni.WriteIni("Erp", "DataBase", sDataBase.Trim(), DBUtility.ClsPub.AppPath + @"/HXERP.ini"); |
| | | ClsIni.WriteIni("K3Erp", "DataBase", sDataBase_K3.Trim(), DBUtility.ClsPub.AppPath + @"/HXERP.ini"); |
| | | DAL.ClsUser oUser = new DAL.ClsUser(); |
| | | |
| | | ds = oUser.CheckCzymc(cmbUser.Text.Trim(),ClsPub.StrToPsd( txtPsd.Text.Trim())); |
| | | if (ds ==null) |
| | | |
| | | ds = oUser.CheckCzymc(cmbUser.Text.Trim(), ClsPub.StrToPsd(txtPsd.Text.Trim())); |
| | | if (ds == null) |
| | | { |
| | | MessageBox.Show("éæ©çå¸å¥ä¸åå¨ï¼", "æç¤º"); |
| | | return; |
| | | } |
| | | if (ds.Tables[0].Rows.Count >0) |
| | | if (ds.Tables[0].Rows.Count > 0) |
| | | { |
| | | ClsPub.CurUserID = ds.Tables[0].Rows[0]["Czybm"].ToString(); |
| | | this.Close(); |
| | |
| | | //å¾å°å½åä¼è®¡æé´ |
| | | int sYear = 0; |
| | | int sPeriod = 0; |
| | | if (!ClsPub.Sub_GetCurPeriod(ref sYear,ref sPeriod)) |
| | | if (!ClsPub.Sub_GetCurPeriod(ref sYear, ref sPeriod)) |
| | | { |
| | | MessageBox.Show("å¾å°å½åä¼è®¡æé´å¤±è´¥ï¼", "æç¤º", MessageBoxButtons.OK, MessageBoxIcon.Error); |
| | | isOk = false; |
| | |
| | | } |
| | | foreach (string eachStr in listStr) |
| | | { |
| | | UserName = UserName+eachStr + ","; |
| | | UserName = UserName + eachStr + ","; |
| | | } |
| | | UserName = UserName.Remove(UserName.LastIndexOf(","), 1); |
| | | // |
| | | ClsIni.WriteIni("UserInfo", "UserName", UserName, DBUtility.ClsPub.AppPath + @"/HXERP.ini"); |
| | | ClsIni.WriteIni("UserInfo", "UserName", UserName, DBUtility.ClsPub.AppPath + @"/HXERP.ini"); |
| | | ClsIni.WriteIni("UserInfo", "HOrgName", cmbHOrg.Text.ToString(), DBUtility.ClsPub.AppPath + @"/HXERP.ini"); |
| | | ClsPub.CurUserName = cmbUser.Text.Trim(); |
| | | ClsPub.AppPath = System.Environment.CurrentDirectory; |
| | | ClsPub.HOrgID = ClsPub.get_ORGANIZATIONSIDByName(ClsPub.isStrNull(cmbHOrg.Text)); |
| | | ClsPub.HOrgNumber = ClsPub.get_ORGANIZATIONSNOByName(ClsPub.isStrNull(cmbHOrg.Text)); |
| | | ClsPub.HOrgName = ClsPub.isStrNull(cmbHOrg.Text); |
| | | if(chkRemember.Checked==true ) |
| | | if (chkRemember.Checked == true) |
| | | { |
| | | ClsIni.WriteIni("UserInfo", "UserPsd", "", DBUtility.ClsPub.AppPath + @"/HXERP.ini"); |
| | | ClsIni.WriteIni("UserInfo", "Remember", "1", DBUtility.ClsPub.AppPath + @"/HXERP.ini"); |
| | |
| | | ClsIni.WriteIni("UserInfo", "UserPsd", "", DBUtility.ClsPub.AppPath + @"/HXERP.ini"); |
| | | ClsIni.WriteIni("UserInfo", "Remember", "0", DBUtility.ClsPub.AppPath + @"/HXERP.ini"); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | private void txtUser_KeyUp(object sender, KeyEventArgs e) |
| | |
| | | |
| | | private void txtPsd_KeyUp(object sender, KeyEventArgs e) |
| | | { |
| | | if (e.KeyValue == 13) |
| | | this.btnOK_Click(sender,e); |
| | | if (e.KeyValue == 13) |
| | | this.btnOK_Click(sender, e); |
| | | } |
| | | |
| | | private void timer1_Tick(object sender, EventArgs e) |
| | |
| | | } |
| | | ClsIni oIni = new ClsIni(); |
| | | // |
| | | UserName = ClsIni.ReadIni("UserInfo", "UserName",DBUtility.ClsPub.AppPath + @"/HXERP.ini"); |
| | | UserName = ClsIni.ReadIni("UserInfo", "UserName", DBUtility.ClsPub.AppPath + @"/HXERP.ini"); |
| | | |
| | | string[] strArr = UserName.Split(','); |
| | | foreach (string str in strArr) |
| | |
| | | } |
| | | cmbUser.SelectedIndex = 0; |
| | | // |
| | | txtUser.Text = ClsIni.ReadIni("UserInfo", "UserName", DBUtility.ClsPub.AppPath + @"/HXERP.ini"); |
| | | txtUser.Text = ClsIni.ReadIni("UserInfo", "UserName", DBUtility.ClsPub.AppPath + @"/HXERP.ini"); |
| | | if (ClsIni.ReadIni("UserInfo", "Remember", DBUtility.ClsPub.AppPath + @"/HXERP.ini") == "1") |
| | | { |
| | | txtPsd.Text = ClsIni.ReadIni("UserInfo", "UserPsd", DBUtility.ClsPub.AppPath + @"/HXERP.ini"); |
| | |
| | | } |
| | | else |
| | | { |
| | | txtPsd.Text =""; |
| | | chkRemember.Checked = false ; |
| | | txtPsd.Text = ""; |
| | | chkRemember.Checked = false; |
| | | } |
| | | } |
| | | |
| | |
| | | public DataSet get_ORGANIZATIONSList() |
| | | { |
| | | try |
| | | { |
| | | return ClsPub.get_ORGANIZATIONSList(); |
| | | { |
| | | return ClsPub.get_ORGANIZATIONSList(); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | |
| | | |
| | | private void label4_Click(object sender, EventArgs e) |
| | | { |
| | | if (MessageBox.Show("ç¡®å®è¦æå¨æ´æ°ç¨åºåï¼æ¬ç¨åºå°èªå¨å
³éï¼","æç¤º",MessageBoxButtons.OKCancel)==DialogResult.OK) |
| | | if (MessageBox.Show("ç¡®å®è¦æå¨æ´æ°ç¨åºåï¼æ¬ç¨åºå°èªå¨å
³éï¼", "æç¤º", MessageBoxButtons.OKCancel) == DialogResult.OK) |
| | | { |
| | | string strFileName = ClsPub.AppPath + @"/HX_Update.exe"; |
| | | System.Diagnostics.Process.Start(strFileName); |
| | |
| | | { |
| | | //textBox1.Focus(); |
| | | string HPassWord = textBox1.Text.Trim().ToString(); |
| | | if (HPassWord == null || HPassWord == "") |
| | | { |
| | | MessageBox.Show("请å·å¡"); |
| | | return; |
| | | } |
| | | //MessageBox.Show(HPassWord); |
| | | SQLHelper.ClsCN oCn1 = new SQLHelper.ClsCN(); |
| | | //1.æ¥æ¾æ°æ®åºæä½å管ç表é颿¯å¦æå¯¹åºè¿ä¸ªå å¯å符串对åºçè®°å½ |
| | |
| | | ",HMaterTexture='" + omodel.HMaterTexture + "'" + |
| | | ",HProductNum='" + omodel.HProductNum + "'" + |
| | | ",HVerNum='" + omodel.HVerNum + "'" + |
| | | ",WorkBillSortNo='" + omodel.WorkBillSortNo + "'" + |
| | | //å å
¥ç产类å |
| | | ",HWorkTypeNum='" + omodel.HWorkTypeNum + "'" + |
| | | " where HInterID=" + lngBillKey.ToString()); |
| | |
| | | ",HProdMaterName,HCusName,HWorkRemark,HImportNote,HMaterNumber_A" + |
| | | ",HMaterNumber_B,HMaterNumber_C,HMaterNumber_D,HProdType,HMaterShortName" + |
| | | ",HMaterIDA,HMaterIDB,HMaterIDC,HMaterIDD,HICMOEntryID" + |
| | | ",HPicNumVer,HPicNumAssemble,HMaterTexture,HProductNum,HVerNum,HPRDORGID,HBLFlag" + |
| | | ",HPicNumVer,HPicNumAssemble,HMaterTexture,HProductNum,HVerNum,HPRDORGID,HBLFlag,WorkBillSortNo" + |
| | | ") " + |
| | | " values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "','" + omodel.HMaker + "',getdate()," + "" + (omodel.HPrevMainSourceInterID == 0 ? omodel.HInterID : omodel.HPrevMainSourceInterID) + |
| | | "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + omodel.HBatchNo + "'," + omodel.HMainMaterID.ToString() + "," + omodel.HKeyMaterID.ToString() + "," + omodel.HNo.ToString() + ",'" + omodel.HOrderProcNO + "'" + |
| | |
| | | ",'" + omodel.HProdMaterName + "','" + omodel.HCusName + "','" + omodel.HWorkRemark + "','" + omodel.HImportNote + "','" + omodel.HMaterNumber_A + "'" + |
| | | ",'" + omodel.HMaterNumber_B + "','" + omodel.HMaterNumber_C + "','" + omodel.HMaterNumber_D + "','" + omodel.HProdType + "','" + omodel.HMaterShortName + "'" + |
| | | ",'" + omodel.HMaterIDA + "','" + omodel.HMaterIDB + "','" + omodel.HMaterIDC + "','" + omodel.HMaterIDD + "'," + omodel.HICMOEntryID + |
| | | ",'" + omodel.HPicNumVer + "','" + omodel.HPicNumAssemble + "','" + omodel.HMaterTexture + "','" + omodel.HProductNum + "','" + omodel.HVerNum + "','"+ omodel.HPRDORGID+ "','"+omodel.HBLFlag+"'" + |
| | | ") "); |
| | | ",'" + omodel.HPicNumVer + "','" + omodel.HPicNumAssemble + "','" + omodel.HMaterTexture + "','" + omodel.HProductNum + "','" + omodel.HVerNum + "','"+ omodel.HPRDORGID+ "','"+omodel.HBLFlag+"','" + omodel.WorkBillSortNo + |
| | | "') "); |
| | | //æå
¥å表 |
| | | foreach (Model.ClsSc_ProcessExchangeBillSub oSub in DetailColl) |
| | | { |
| | |
| | | public string HVerNum;//çæ¬ |
| | | public string HSeOrderEntryID; |
| | | public string HSeOrderInterID; |
| | | public string WorkBillSortNo; |
| | | } |
| | | } |
| | |
| | | { |
| | | omodel.Kf_OtherInBill_BillTypeOneScan = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); |
| | | } |
| | | if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Kf_OtherInBillCheck_MustQtyCtl") |
| | | { |
| | | omodel.Kf_OtherInBillCheck_MustQtyCtl = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); |
| | | } |
| | | //å
¶ä»åºåºå |
| | | if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Kf_OtherOutBill_AutoCheck") |
| | | { |
| | |
| | | { |
| | | omodel.Kf_OtherOutBill_BillTypeOneScan = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); |
| | | } |
| | | if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Kf_OtherOutBillCheck_MustQtyCtl") |
| | | { |
| | | omodel.Kf_OtherOutBillCheck_MustQtyCtl = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); |
| | | } |
| | | //è°æ¨å |
| | | if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Kf_MoveStockBill_AutoCheck") |
| | | { |
| | |
| | | public string Kf_OtherInBill_MustQtyCtl; |
| | | public string Kf_OtherInBill_BarCodeMustSameSourceBill; // æ¡ç å¿
é¡»åæºåä¸è´ |
| | | public string Kf_OtherInBill_BillTypeOneScan;//æ¬åæ®ç±»åå
åªå
è®¸ä¸æ¬¡æ«ç ï¼å¯ä¸ç ï¼å«ç¼ååè¡¨ï¼ |
| | | public string Kf_OtherInBillCheck_MustQtyCtl; //æ ¡éªæ°éæ§å¶ |
| | | //å
¶ä»åºåº |
| | | public string Kf_OtherOutBill_AutoCheck; |
| | | public string Kf_OtherOutBill_ERPMode; |
| | | public string Kf_OtherOutBill_MustQtyCtl; |
| | | public string Kf_OtherOutBill_BarCodeMustSameSourceBill; // æ¡ç å¿
é¡»åæºåä¸è´ |
| | | public string Kf_OtherOutBill_BillTypeOneScan;//æ¬åæ®ç±»åå
åªå
è®¸ä¸æ¬¡æ«ç ï¼å¯ä¸ç ï¼å«ç¼ååè¡¨ï¼ |
| | | public string Kf_OtherOutBillCheck_MustQtyCtl; //æ ¡éªæ°éæ§å¶ |
| | | //è°æ¨ |
| | | public string Kf_MoveStockBill_AutoCheck; |
| | | public string Kf_MoveStockBill_ERPMode; |
| | |
| | | ",HBarcodeQtys,HBarcodeNo,HDeptID,HWhID,HSPID,HRemark " + |
| | | ",HCusID,HCusType,HEndDate,HWorkLineName,HBarCodeDate " + |
| | | ",HSTOCKORGID,HOWNERID,HSeOrderBillNo,HInterID,HEntryID " + |
| | | ",HGiveAwayFlag,HSeOrderSEQ " + |
| | | ",HGiveAwayFlag,HSeOrderSEQ,HInitSourceEntryID " + |
| | | ",HMaterName,HMaterModel,HPinfan,HAuxPropID,HMTONo,HInnerBillNo " + |
| | | ") values (" |
| | | + "'" + HBarCode + "','" + HBarCodeType + "'," + HMaterID.ToString() + "," + HUnitID.ToString() + "," + HQty2.ToString() |
| | |
| | | + ", " + HBarcodeQtys.ToString() + "," + HBarcodeNo.ToString() + "," + HDeptID.ToString() + "," + HWhID.ToString() + "," + HSPID.ToString() + ",'" + HRemark + "'" |
| | | + ", " + HCusID.ToString() + ",'" + HCusType + "','" + HEndDate.ToShortDateString() + "','" + HWorkLineName + "','" + sDate + "'" |
| | | + ", " + HOrgID.ToString() + "," + HOrgID.ToString() + ",'" + HSeOrderBillNo + "'," + HInterID.ToString() + "," + HEntryID.ToString() + "" |
| | | + ", " + DBUtility.ClsPub.BoolToString(HGiveAwayFlag) + "," + HSeOrderSEQ.ToString() |
| | | + ", " + DBUtility.ClsPub.BoolToString(HGiveAwayFlag) + "," + HSeOrderSEQ.ToString() + "," + HSourceEntryID.ToString() |
| | | + ",'" + HMaterName + "','" + HMaterModel + "','" + HPinfan + "'," + HAuxPropID.ToString() + ",'" + HMTONo + "','" + HInnerBillNo + "')"); |
| | | |
| | | |
| | |
| | | |
| | | 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) |
| | |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ds = oCN.RunProcReturn("select sum(HQty) from JIT_CallGoodsBackRequestBillSub " + |
| | | $"where HSourceInterID={listCa[i].HSouceInterID} and HSourceEntryID ={listCa[i].HSourceEntryID} and HSourceBillNo = '{listCa[i].HSourceBillNo}' and HMaterID={listCa[i].HMaterialID}", "JIT_CallGoodsBackRequestBillSub"); |
| | | ds = oCN.RunProcReturn("select sum(d.HQty) HQty from JIT_CallGoodsBackRequestBillSub c inner join JIT_CallGoodsBackBillSub d on c.HInterID = d.HSourceInterID and c.HEntryID = d.HSourceEntryID and c.HMaterID = d.HMaterID " + |
| | | $"where c.HSourceInterID={listCa[i].HSouceInterID} and c.HSourceEntryID ={listCa[i].HSourceEntryID} and c.HSourceBillNo = '{listCa[i].HSourceBillNo}' and c.HMaterID={listCa[i].HMaterialID}", "JIT_CallGoodsBackRequestBillSub"); |
| | | |
| | | if ((double.Parse(ds.Tables[0].Rows[0][0].ToString()==""?"0": ds.Tables[0].Rows[0][0].ToString()) +listCa[i].éææ°é) > listCa[i].已嫿æ°é) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = $"å·²ç»éæç³è¯·æ°é:{double.Parse(ds.Tables[0].Rows[0][0].ToString())},å¯éææ°é为:{(listCa[i].已嫿æ°é - double.Parse(ds.Tables[0].Rows[0][0].ToString()))}!"; |
| | | objJsonResult.Message = $"å·²ç»éææ°é:{double.Parse(ds.Tables[0].Rows[0][0].ToString())},å¯éææ°é为:{(listCa[i].已嫿æ°é - double.Parse(ds.Tables[0].Rows[0][0].ToString()))}!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ds = oCN.RunProcReturn("select sum(HQty) from JIT_CallGoodsBackRequestBillSub " + |
| | | $"where HSourceInterID={listCa[i].HSouceInterID} and HSourceEntryID ={listCa[i].HSourceEntryID} and HSourceBillNo = '{listCa[i].HSourceBillNo}' and HMaterID={listCa[i].HMaterialID}", "JIT_CallGoodsBackRequestBillSub"); |
| | | ds = oCN.RunProcReturn("select sum(d.HQty) HQty from JIT_CallGoodsBackRequestBillSub c inner join JIT_CallGoodsBackBillSub d on c.HInterID = d.HSourceInterID and c.HEntryID = d.HSourceEntryID and c.HMaterID = d.HMaterID " + |
| | | $"where c.HSourceInterID={listCa[i].HSouceInterID} and c.HSourceEntryID ={listCa[i].HSourceEntryID} and c.HSourceBillNo = '{listCa[i].HSourceBillNo}' and c.HMaterID={listCa[i].HMaterialID}", "JIT_CallGoodsBackRequestBillSub"); |
| | | |
| | | if ((double.Parse(ds.Tables[0].Rows[0][0].ToString() == "" ? "0" : ds.Tables[0].Rows[0][0].ToString()) + listCa[i].éææ°é) > listCa[i].已嫿æ°é) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = $"å·²ç»éæç³è¯·æ°é:{double.Parse(ds.Tables[0].Rows[0][0].ToString())},å¯éææ°é为:{(listCa[i].已嫿æ°é - double.Parse(ds.Tables[0].Rows[0][0].ToString()))}!"; |
| | | objJsonResult.Message = $"å·²ç»éææ°é:{double.Parse(ds.Tables[0].Rows[0][0].ToString())},å¯éææ°é为:{(listCa[i].已嫿æ°é - double.Parse(ds.Tables[0].Rows[0][0].ToString()))}!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ds = oCN.RunProcReturn("select sum(HQty) from JIT_CallGoodsBackRequestBillSub " + |
| | | $"where HSourceInterID={listCa[i].HSouceInterID} and HSourceEntryID ={listCa[i].HSourceEntryID} and HSourceBillNo = '{listCa[i].HSourceBillNo}' and HMaterID={listCa[i].HMaterialID}", "JIT_CallGoodsBackRequestBillSub"); |
| | | ds = oCN.RunProcReturn("select sum(d.HQty) HQty from JIT_CallGoodsBackRequestBillSub c inner join JIT_CallGoodsBackBillSub d on c.HInterID = d.HSourceInterID and c.HEntryID = d.HSourceEntryID and c.HMaterID = d.HMaterID " + |
| | | $"where c.HSourceInterID={listCa[i].HSouceInterID} and c.HSourceEntryID ={listCa[i].HSourceEntryID} and c.HSourceBillNo = '{listCa[i].HSourceBillNo}' and c.HMaterID={listCa[i].HMaterialID}", "JIT_CallGoodsBackRequestBillSub"); |
| | | |
| | | if ((double.Parse(ds.Tables[0].Rows[0][0].ToString() == "" ? "0" : ds.Tables[0].Rows[0][0].ToString()) + listCa[i].éææ°é) > listCa[i].已嫿æ°é) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = $"å·²ç»éæç³è¯·æ°é:{double.Parse(ds.Tables[0].Rows[0][0].ToString())},å¯éææ°é为:{(listCa[i].已嫿æ°é - double.Parse(ds.Tables[0].Rows[0][0].ToString()))}!"; |
| | | objJsonResult.Message = $"å·²ç»éææ°é:{double.Parse(ds.Tables[0].Rows[0][0].ToString())},å¯éææ°é为:{(listCa[i].已嫿æ°é - double.Parse(ds.Tables[0].Rows[0][0].ToString()))}!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// è·åä¾åºåå表 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("Web/GetSupplierList_Json")] |
| | | [HttpGet] |
| | | public object GetSupplierList_Json(string Supplier) |
| | | public object GetSupplierList_Json(string Supplier, Int64 HOrgID) |
| | | { |
| | | sWhere = " Where HStopFlag=0 and HEndFlag=1"; |
| | | sWhere = " Where HStopFlag=0 and HEndFlag=1 and HUSEORGID =" + HOrgID + ""; |
| | | //sWhere = " Where HStopFlag=0 and HEndFlag=1 and HUSEORGID = " + DBUtility.ClsPub.HORGANIZATIONSID.ToString(); |
| | | if (Supplier != "") |
| | | { |
| | | sWhere = sWhere + " and ( HNumber like '%" + Supplier + "%' or HName like '%" + Supplier + "%' ) "; |
| | | sWhere = sWhere + " and ( HNumber like '%" + Supplier + "%' or HName like '%" + Supplier + "%' or HUSEORGID like '%" + Supplier + "%' ) "; |
| | | } |
| | | try |
| | | { |
| | | ds = webserver.GetSupplierList(sWhere, ref DBUtility.ClsPub.sErrInfo); |
| | | WebS.WebService1 oWeb = new WebS.WebService1(); |
| | | ds = oWeb.GetSupplierList(sWhere, ref DBUtility.ClsPub.sErrInfo); |
| | | //ds = webserver.GetSupplierList(sWhere, ref DBUtility.ClsPub.sErrInfo); |
| | | if (ds == null || ds.Tables[0].Rows.Count <= 0) |
| | | { |
| | | objjson.code = "0"; |
| | |
| | | //sWhere = " Where HStopFlag=0 and HEndFlag=1 and HUSEORGID = " + DBUtility.ClsPub.HORGANIZATIONSID.ToString(); |
| | | if (sWhere != "") |
| | | { |
| | | sWhere = sWhere + " and ( HNumber like '%" + sWhere + "%' or HName like '%" + sWhere + "%' ) "; |
| | | sWhere = " and ( HNumber like '%" + sWhere + "%' or HName like '%" + sWhere + "%' ) "; |
| | | } |
| | | try |
| | | { |