private void btn_OK_Click(object sender, EventArgs e) { string sErr = ""; if (!FrmSTable.IsInteger(this.txt_Qty.Text.Trim())) { MessageBox.Show(""); this.txt_Qty.SelectAll(); this.txt_Qty.FindForm(); } else { int pQty = int.Parse(this.txt_Qty.Text.Trim()); string pAreaId = ""; if ((this.cmb_Area.Text.Trim() != "") && (this.cmb_Area.SelectedValue != null)) { pAreaId = this.cmb_Area.SelectedValue.ToString().Trim(); } string pPltSpec = ""; if ((this.cmb_PltSpec.Text.Trim() != "") && (this.cmb_PltSpec.SelectedValue != null)) { pPltSpec = this.cmb_PltSpec.SelectedValue.ToString().Trim(); } string str4 = PubDBCommFuns.sp_CreatePaleltNo(base.AppInformation.SvrSocket, pQty, 6, "", pAreaId, pPltSpec, out sErr); MessageBox.Show(sErr); } }
public static void ShowSelect() { FrmSTable table = null; table = new FrmSelectCell(); table.InitFormParameters(); table.ShowDialog(); table.Dispose(); }
private void btn_OK_Click(object sender, EventArgs e) { if (this.bds_Item.Count == 0) { MessageBox.Show("无字段字典表数据!"); } else if (!(this.cmb_Item.Text.Trim() != "") || (this.cmb_Item.SelectedIndex <= -1)) { MessageBox.Show("请选修改项目!"); } else { bool flag = true; DataRowView current = null; current = (DataRowView)this.bds_Item.Current; if (current != null) { string str = current["cColName"].ToString(); string text = this.txt_ItemValue.Text; string str3 = current["cDataType"].ToString(); string str4 = str3.Trim(); if ((str4 != null) && (str4 != "string")) { if (!(str4 == "int")) { if (str4 == "double") { flag = FrmSTable.IsNumberic(text.Trim()); } else if (str4 == "date") { flag = FrmSTable.IsDateTime(text.Trim()); } else if (!(str4 == "bool")) { } } else { flag = FrmSTable.IsInteger(text.Trim()); } } if (!flag) { MessageBox.Show("录入项目值为非法数据,请录入正确的数据!"); this.txt_ItemValue.SelectAll(); this.txt_ItemValue.Focus(); } else if (this._doBatchUpdateData != null) { this._doBatchUpdateData(str.Trim(), text, str3.Trim()); } } } }
private void txt_RTotal_TextChanged(object sender, EventArgs e) { double num = 0.0; double num2 = 0.0; double num3 = 0.0; double num4 = 0.0; double num5 = 0.0; if ((this.txt_RTotal.Text.Trim() != "") && FrmSTable.IsNumberic(this.txt_RTotal.Text.Trim())) { num2 = double.Parse(this.txt_RTotal.Text.Trim()); } else if (!(!(this.txt_RTotal.Text.Trim() != "") || FrmSTable.IsNumberic(this.txt_RTotal.Text.Trim()))) { MessageBox.Show("请录入合法数值!"); this.txt_RTotal.SelectAll(); this.txt_RTotal.Focus(); return; } if ((this.txt_fBad.Text.Trim() != "") && FrmSTable.IsNumberic(this.txt_fBad.Text.Trim())) { num3 = double.Parse(this.txt_fBad.Text.Trim()); } else if (!(!(this.txt_fBad.Text.Trim() != "") || FrmSTable.IsNumberic(this.txt_fBad.Text.Trim()))) { MessageBox.Show("请录入合法数值!"); this.txt_fBad.SelectAll(); this.txt_fBad.Focus(); return; } if (this.txt_Qty.Text.Trim() == "") { MessageBox.Show("对不起,帐面数不能为空!"); } else { num = double.Parse(this.txt_Qty.Text.Trim()); num4 = (num2 - num) - num3; num5 = num2 - num3; this.txt_fDiff.Text = num4.ToString(); this.txt_RQty.Text = num5.ToString(); } }
private void btnOK_Click(object sender, EventArgs e) { string pAjustNo = ""; if (this.txt_cMNo.Text.Trim() == "") { MessageBox.Show("对不起,物料编码不能为空!", "", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); this.txt_cMNo.Focus(); } else if (this.txt_fQty.Text.Trim() == "") { MessageBox.Show("对不起,物料数量不能为空!", "", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); this.txt_fQty.Focus(); } else if (!FrmSTable.IsNumberic(this.txt_fQty.Text.Trim())) { MessageBox.Show("对不起,物料数量为非法数值!", "", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); this.txt_fQty.SelectAll(); this.txt_fQty.Focus(); } else if (this.txt_cUnit.Text.Trim() == "") { MessageBox.Show("对不起,单位不能为空!", "", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); this.txt_cUnit.SelectAll(); this.txt_cUnit.Focus(); } else { pAjustNo = this.drvItem["cBNo"].ToString(); this.UIToDataRowView(this.drvItem, this.grdEdit); string sErr = ""; string str3 = DBFuns.sp_Chk_WriteAjustDtl(base.AppInformation.SvrSocket, base.UserInformation.UserName, base.UserInformation.UnitId, "WMS", pAjustNo, this.txt_cWHId.Text.Trim(), this.txt_cPosId.Text.Trim(), this.txt_nPalletId.Text.Trim(), this.txt_cBoxId.Text.Trim(), this.txt_cMNo.Text.Trim(), double.Parse(this.txt_fQty.Text.Trim()), this.txt_cBNoIn.Text.Trim(), int.Parse(this.txt_nItemIn.Text.Trim()), "", out sErr); if (((str3.Trim() != "") && (str3.Trim() != "0")) && (sErr.Trim() != "")) { MessageBox.Show(sErr); } else { base.Close(); } } }
private void btnOK_Click(object sender, EventArgs e) { Exception exception; string sErr = ""; double num = 0.0; double num2 = 0.0; double pDiff = 0.0; double pBad = 0.0; if (this.txt_Qty.Text.Trim() != "") { num = double.Parse(this.txt_Qty.Text.Trim()); } if (this.txt_RQty.Text.Trim() != "") { try { num2 = double.Parse(this.txt_RQty.Text.Trim()); } catch (Exception exception1) { exception = exception1; MessageBox.Show("实盘数录入有误,数值非法!"); this.txt_RQty.SelectAll(); this.txt_RQty.Focus(); return; } } else { MessageBox.Show("对不起,实盘数不能为空!"); this.txt_RQty.Focus(); return; } if (this.txt_fBad.Text.Trim() != "") { try { pBad = double.Parse(this.txt_fBad.Text.Trim()); } catch (Exception exception2) { exception = exception2; MessageBox.Show("不良品数录入有误,数值非法!"); this.txt_fBad.SelectAll(); this.txt_fBad.Focus(); return; } } else { MessageBox.Show("对不起,不良品数不能为空!"); this.txt_fBad.Focus(); return; } if (pBad < 0.0) { MessageBox.Show("对不起不良品数不能为负数!"); this.txt_fBad.SelectAll(); this.txt_fBad.Focus(); } else if (this.txt_fDiff.Text.Trim() == "") { MessageBox.Show("对不起,损溢数不能为空!"); this.txt_fDiff.Focus(); } else { if (FrmSTable.IsNumberic(this.txt_fDiff.Text.Trim())) { pDiff = double.Parse(this.txt_fDiff.Text.Trim()); } else { MessageBox.Show("损溢数录入有误,数值非法!"); this.txt_fDiff.SelectAll(); this.txt_fDiff.Focus(); return; } if (num2 != (num + pDiff)) { MessageBox.Show("对不起,实盘数 不等于 帐面数 + 损溢数"); this.txt_fDiff.SelectAll(); this.txt_fDiff.Focus(); } else { string str2 = PubDBCommFuns.sp_Chk_WriteChkDtl(base.AppInformation.SvrSocket, base.UserInformation.UserName, base.UserInformation.UnitId, "WMS", this.txt_cWHId.Text.Trim(), this.txt_cPosId.Text.Trim(), this.txt_nPalletId.Text.Trim(), this.txt_cBoxId.Text.Trim(), this.txt_cMNo.Text.Trim(), pDiff, pBad, this.txt_cUnit.Text.Trim(), this.txt_cBNoIn.Text.Trim(), int.Parse(this.txt_nItemIn.Text.Trim()), this._CheckNo.Trim(), out sErr); if (((str2.Trim() != "0") && (str2.Trim() != "B")) && (sErr.Trim() != "")) { MessageBox.Show(sErr); } else { MessageBox.Show("登记成功!"); this._IsOK = true; base.Close(); } } } }
private void btnOK_Click(object sender, EventArgs e) { string str = ""; if (this.txt_Dtl_cMNo.Text.Trim() == "") { MessageBox.Show("对不起,物料编码不能为空!", "", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); this.txt_Dtl_cMNo.Focus(); } else if (this.txt_Dtl_fQty.Text.Trim() == "") { MessageBox.Show("对不起,物料数量不能为空!", "", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); this.txt_Dtl_fQty.Focus(); } else if (!FrmSTable.IsNumberic(this.txt_Dtl_fQty.Text.Trim())) { MessageBox.Show("对不起,物料数量为非法数值!", "", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); this.txt_Dtl_fQty.SelectAll(); this.txt_Dtl_fQty.Focus(); } else if (double.Parse(this.txt_Dtl_fQty.Text.Trim()) == 0.0) { MessageBox.Show("对不起,数量不能为0"); this.txt_Dtl_fQty.SelectAll(); this.txt_Dtl_fQty.Focus(); } else if (this.txt_Dtl_cUnit.Text.Trim() == "") { MessageBox.Show("对不起,单位不能为空!", "", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); this.txt_Dtl_cUnit.SelectAll(); this.txt_Dtl_cUnit.Focus(); } else { if (!this.isOutBill) { } if (this.isOutBill && (double.Parse(this.txt_Dtl_fQty.Text.Trim()) > this.fUseQty)) { MessageBox.Show("对不起,出库数大于可出数!", "", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); this.txt_Dtl_fQty.SelectAll(); this.txt_Dtl_fQty.Focus(); } else { string str2; string str3; DataSet set; this.UIToDataRowView(this.drvItem, this.pnlDtlEdit); if (this.bIsNew) { str = this.drvItem["cBNo"].ToString(); this.bIsResultOK = true; this.bIsShowGrid = false; this.DataRowViewToUI(this.drvItem, this.pnlDtlEdit); this.bIsShowGrid = true; str2 = DBSQLCommandInfo.GetSQLByDataRow(this.drvItem, "TWB_BillRemoveDtl", "cBNo,cMNo", "cMName,cSpec,cMatStyle,cMatQCLevel,cMatOther,cCSId,cSupplier", true); str3 = ""; set = PubDBCommFuns.GetDataBySql(str2, DBSQLCommandInfo.GetFieldsForDate(this.drvItem), out str3); this.bIsResultOK = set.Tables[0].Rows[0][0].ToString() == "0"; if (this.bIsResultOK) { MessageBox.Show("增加明细成功!"); this.ClearUIValues(this.pnlDtlEdit); this.drvItem["cBNo"] = str; this.drvItem["cMNo"] = ""; this.DataRowViewToUI(this.drvItem, this.pnlDtlEdit); this.txt_Dtl_cMNo.SelectAll(); this.txt_Dtl_cMNo.Focus(); } } else { this.bIsShowGrid = false; this.DataRowViewToUI(this.drvItem, this.pnlDtlEdit); this.bIsShowGrid = true; str2 = DBSQLCommandInfo.GetSQLByDataRow(this.drvItem, "TWB_BillRemoveDtl", "cBNo,cMNo", "cMName,cSpec,cMatStyle,cMatQCLevel,cMatOther,cCSId,cSupplier", false); str3 = ""; set = PubDBCommFuns.GetDataBySql(str2, DBSQLCommandInfo.GetFieldsForDate(this.drvItem), out str3); this.bIsResultOK = set.Tables[0].Rows[0][0].ToString() == "0"; base.Close(); } } } }
public void LoadByModeForm(WMSAppInfo objApp, WMSUserInfo objUser, string objModule) { FrmSTable table = null; if ((objModule == string.Empty) || (objModule.Trim() == "")) { table = new FrmStockInfo { ModuleRtsId = "2105", ModuleRtsName = "仓库信息管理" }; } else { switch (objModule.Trim().ToLower()) { case "2105": table = new FrmStockInfo { ModuleRtsId = objModule.Trim().ToLower(), ModuleRtsName = "仓库设定" }; break; case "2106": table = new FrmStockAreaInfo { ModuleRtsId = objModule.Trim().ToLower(), ModuleRtsName = "货区设定" }; break; case "2107": table = new FrmStockPositInfo { ModuleRtsId = objModule.Trim().ToLower(), ModuleRtsName = "货位设定" }; break; case "2108": table = new FrmStockPalletInfo { ModuleRtsId = objModule.Trim().ToLower(), ModuleRtsName = "托盘设定" }; break; case "2109": table = new FrmStockBoxInfo { ModuleRtsId = objModule.Trim().ToLower(), ModuleRtsName = "周转箱设定" }; break; case "2110": table = new FrmStockOrderTypeInfo { ModuleRtsId = objModule.Trim().ToLower(), ModuleRtsName = "单据类别" }; break; case "2111": table = new FrmStockMaterTypeInfo { ModuleRtsId = objModule.Trim().ToLower(), ModuleRtsName = "物料类别" }; break; case "2112": table = new FrmStockMaterInfo { ModuleRtsId = objModule.Trim().ToLower(), ModuleRtsName = "物料信息" }; break; case "2116": table = new FrmUnit { ModuleRtsId = objModule.Trim().ToLower(), ModuleRtsName = "计量单位管理" }; break; case "2117": table = new frmBaseItem { ModuleRtsId = objModule.Trim().ToLower(), ModuleRtsName = "基本码表管理" }; break; } table.AppInformation = objApp; table.UserInformation = objUser; table.InitFormParameters(); table.ShowDialog(); table.Dispose(); } }
public void LoadByModeForm(WMSAppInfo objApp, WMSUserInfo objUser, string objModule) { FrmSTable table = null; if ((objModule == string.Empty) || (objModule.Trim() == "")) { table = new frmInEmpty { ModuleRtsId = "3107", ModuleRtsName = "空托盘入库" }; } else { switch (objModule.Trim().ToLower()) { case "3102": table = new FrmStockMPalletWMSIn { ModuleRtsId = objModule.Trim().ToLower(), ModuleRtsName = "入库配盘" }; break; case "3202": table = new FrmStockMPltWMSOut { ModuleRtsId = objModule.Trim().ToLower(), ModuleRtsName = "出库配盘" }; break; case "3111": table = new FrmStockMExceptionSet { ModuleRtsId = objModule.Trim().ToLower(), ModuleRtsName = "指令异常处理" }; break; case "3104": table = new frmInEmpty { ModuleRtsId = objModule.Trim().ToLower(), ModuleRtsName = "空托盘入库" }; break; case "3204": table = new frmOutEmpty { ModuleRtsId = objModule.Trim().ToLower(), ModuleRtsName = "空托盘出库" }; break; case "3103": table = new frmTask { ModuleRtsId = objModule.Trim().ToLower() }; ((frmTask)table).WorkTaskType = TaskType.ttTaskInOnly; table.ModuleRtsName = "入库任务管理"; break; case "3203": table = new frmTask { ModuleRtsId = objModule.Trim().ToLower() }; ((frmTask)table).WorkTaskType = TaskType.ttTaskOutOnly; table.ModuleRtsName = "出库任务管理"; break; case "3405": table = new frmTask { ModuleRtsId = objModule.Trim().ToLower() }; ((frmTask)table).WorkTaskType = TaskType.ttTaskAll; table.ModuleRtsName = "任务管理"; break; case "3406": table = new frmWareCellState { ModuleRtsId = objModule.Trim().ToLower(), ModuleRtsName = "平面仓位图" }; break; case "3205": table = new frmOutAndSee { ModuleRtsId = objModule.Trim().ToLower(), ModuleRtsName = "出库查看" }; break; case "3404": table = new frmOutAndSee { ModuleRtsId = objModule.Trim().ToLower(), ModuleRtsName = "出库查看" }; break; case "3407": table = new frmTaskCheckOK { ModuleRtsId = objModule.Trim().ToLower(), ModuleRtsName = "任务确认" }; break; } table.AppInformation = objApp; table.UserInformation = objUser; table.InitFormParameters(); table.ShowDialog(); table.Dispose(); } }
public void LoadByModeForm(WMSAppInfo objApp, WMSUserInfo objUser, string objModule) { FrmSTable table = null; if ((objModule == string.Empty) || (objModule.Trim() == "")) { table = new FrmStockMCheck { ModuleRtsId = "3401", ModuleRtsName = "库存盘点" }; } else { switch (objModule.Trim().ToLower()) { case "3401": table = new FrmStockMCheck { ModuleRtsId = objModule.Trim().ToLower(), ModuleRtsName = "库存盘点" }; break; case "3402": table = new frmMoving { ModuleRtsId = objModule.Trim().ToLower(), ModuleRtsName = "移库" }; break; case "3403": table = new FrmStockMAjust { ModuleRtsId = objModule.Trim().ToLower(), ModuleRtsName = "库存调整" }; break; case "3408": table = new frmBillRemove { ModuleRtsId = objModule.Trim().ToLower(), ModuleRtsName = "调拨单管理" }; break; case "3409": table = new frmStBadMaterial { ModuleRtsId = objModule.Trim().ToLower(), ModuleRtsName = "不良品单管理" }; break; case "5110": table = new frmRptInOutRece { ModuleRtsId = objModule.Trim().ToLower(), ModuleRtsName = "出入库汇总报表" }; break; case "5111": table = new frmSlackMatCount { ModuleRtsId = objModule.Trim().ToLower(), ModuleRtsName = "呆滞物料汇总" }; break; case "3411": table = new frmMergePallet { ModuleRtsId = objModule.Trim().ToLower(), ModuleRtsName = "合盘管理" }; break; } table.AppInformation = objApp; table.UserInformation = objUser; table.InitFormParameters(); table.ShowDialog(); table.Dispose(); } }