private void save_button_Click(object sender, EventArgs e)//保存 { if (this.dicdesc_yTextBox.Text.Trim().Length == 0) { WJs.alert("请输入名称!"); dicdesc_yTextBox.Focus(); return; } if (this.defvalue_ytComboBox.SelectedIndex < 0) { WJs.alert("请设置是否为默认值!"); defvalue_ytComboBox.Focus(); return; } ActionLoad ac = ActionLoad.Conn(); ac.Action = "LKWZSVR.lkeq.JiChuDictionary.EQUnit"; ac.Sql = "Save"; ac.Add("DICGRPID", this.dicgrpid_yTextBox.Text); ac.Add("DICDESC", this.dicdesc_yTextBox.Text); ac.Add("FIXED", 1); ac.Add("PYCODE", this.pycode_yTextBox5.Text); ac.Add("DEFVALUE", TvList.getValue(this.defvalue_ytComboBox).ToInt()); if (!isAdd) { ac.Add("DICID", dr["DICID"].ToString()); ac.SetKeyValue("DICGRPID,DICID"); } ac.ServiceLoad += new YtClient.data.events.LoadEventHandle(ac_ServiceLoad); ac.Post(); }
void ac_ServiceLoad(object sender, YtClient.data.events.LoadEvent e) { WJs.alert(e.Msg.Msg); if (!isAdd || !WJs.confirm("是否继续添加物资信息?")) { WZDM.ReLoadData(TvList.getValue(this.ytComboBox_KindCode).ToString()); this.Close(); } else { this.ytComboBox_CountCode.SelectedIndex = -1; this.ytComboBox_ifUse.SelectedIndex = 0; this.ytComboBox_WORKUNITCODE.SelectedIndex = -1; this.selTextInpt_PRODUCTPLACE.Value = null; this.selTextInpt_PRODUCTPLACE.Text = null; this.ytComboBox_SingerCode.SelectedIndex = -1; this.ytComboBox_IFJL.SelectedIndex = -1; this.ytComboBox_ZJTYPE.SelectedIndex = -1; this.yTextBox_BM.Clear(); this.yTextBox_BMJM.Clear(); this.yTextBox_GuiG.Clear(); this.yTextBox_ZJRATE.Clear(); this.yTextBox_XH.Clear(); this.yTextBox_JC.Clear(); this.yTextBox_JM.Clear(); this.yTextBox_Name.Clear(); this.yTextBox_PY.Clear(); this.yTextBox_Rec.Clear(); this.yTextBox_TiaoXM.Clear(); this.yTextBox_WB.Clear(); this.yTextBox_EQID.Clear(); } }
private void Search_button_Click(object sender, EventArgs e) { if (this.InStatus_ytComboBox.Text.Trim().Length == 0) { WJs.alert("请选择出库状态!"); return; } if (this.InWare_selTextInpt.Value == null) { WJs.alert("请选择出库库房!"); return; } this.dataGView1.reLoad(new object[] { His.his.Choscode, TvList.getValue(this.InStatus_ytComboBox).ToInt(), this.InWare_selTextInpt.Value, this.dateTimePicker1.Value, this.dateTimePicker2.Value }); this.TiaoSu.Text = this.dataGView1.RowCount.ToString() + "笔"; this.JinEHeJi.Text = this.dataGView1.Sum("总金额").ToString() + "元"; }
private void btn_Save_Click(object sender, EventArgs e) { if (this.yTextBox_Name.Text.Trim().Length == 0) { WJs.alert("请输入类别名称!"); this.yTextBox_Name.Focus(); return; } if (this.ytComboBox_ifUse.SelectedIndex == -1) { WJs.alert("请选择是否使用!"); ytComboBox_ifUse.Focus(); return; } if (this.ytComboBox_IfDefault.SelectedIndex == -1) { WJs.alert("请选择是否默认值!"); ytComboBox_IfDefault.Focus(); return; } string str = LData.Es("EQMostLarge_REPAIRCODE", null, new object[] { His.his.Choscode }); //if (str != null) //{ if (str == "99") { WJs.alert("编码已达到最大数,不允许新增操作!"); return; } //} //else //{ // return; //} ActionLoad ac = ActionLoad.Conn(); ac.Action = "LKWZSVR.lkeq.JiChuDictionary.EQFixKindSvr"; ac.Sql = "SaveFixKindInfo"; ac.Add("IFDEFAULT", TvList.getValue(this.ytComboBox_IfDefault).ToInt()); ac.Add("IFUSE", TvList.getValue(this.ytComboBox_ifUse).ToInt()); ac.Add("REPAIRNAME", this.yTextBox_Name.Text); ac.Add("USERID", His.his.UserId); ac.Add("USERNAME", His.his.UserName); ac.Add("CHOSCODE", His.his.Choscode); ac.Add("PYCODE", this.yTextBox_PY.Text); ac.Add("WBCODE", this.yTextBox_WB.Text); ac.Add("MEMO", this.yTextBox_Rec.Text); if (!isAdd) { ac.Add("REPAIRCODE", Info["类别编码"].ToInt()); } else { ac.Add("REPAIRCODE", null); } ac.ServiceLoad += new YtClient.data.events.LoadEventHandle(ac_ServiceLoad); ac.ServiceFaiLoad += new YtClient.data.events.LoadFaiEventHandle(ac_ServiceFaiLoad); ac.Post(); }
private void btn_Save_Click(object sender, EventArgs e) { if (this.yTextBox_Name.Text.Trim().Length == 0) { WJs.alert("请输入设备名称!"); this.yTextBox_Name.Focus(); return; } if (this.ytComboBox_KindCode.SelectedIndex == -1) { WJs.alert("请选择所属类别!"); ytComboBox_KindCode.Focus(); return; } if (this.ytComboBox_SingerCode.SelectedIndex == -1) { WJs.alert("请选择单位编码!"); ytComboBox_SingerCode.Focus(); return; } if (this.ytComboBox_IFJL.SelectedIndex == -1) { WJs.alert("请选择是否计量设备!"); ytComboBox_IFJL.Focus(); return; } if (this.ytComboBox_ifUse.SelectedIndex == -1) { WJs.alert("请选择是否使用!"); ytComboBox_ifUse.Focus(); return; } if (this.ytComboBox_ZJTYPE.SelectedIndex == -1) { WJs.alert("请选择折旧方式!"); ytComboBox_SingerCode.Focus(); return; } //if (this.yTextBox_ZJRATE.Text.Trim().Length == 0) //{ // WJs.alert("请输入折旧百分比!"); // this.yTextBox_ZJRATE.Focus(); // return; //} if (this.ytComboBox_ZJTYPE.SelectedIndex == 1) { if (this.ytComboBox_WORKUNITCODE.SelectedIndex == -1) { WJs.alert("折旧方式为工作量法时必须输入工作量单位编码!"); this.ytComboBox_WORKUNITCODE.Focus(); return; } } if (this.yTextBox_PY.Text.Trim().Length > 10) //保证字符串长度不超过10 { this.yTextBox_PY.Text = this.yTextBox_PY.Text.Substring(0, 10); } if (this.yTextBox_WB.Text.Trim().Length > 10)//保证字符串长度不超过10 { this.yTextBox_WB.Text = this.yTextBox_WB.Text.Substring(0, 10); } ActionLoad ac = ActionLoad.Conn(); ac.Action = "LKWZSVR.lkeq.JiChuDictionary.EQDictSvr"; ac.Sql = "SaveDictEQInfo"; ac.Add("EQNAME", this.yTextBox_Name.Text); ac.Add("PYCODE", this.yTextBox_PY.Text); ac.Add("WBCODE", this.yTextBox_WB.Text); ac.Add("SHORTNAME", this.yTextBox_JC.Text); ac.Add("SHORTCODE", this.yTextBox_JM.Text); ac.Add("ALIASNAME", this.yTextBox_BM.Text); ac.Add("ALIASCODE", this.yTextBox_BMJM.Text); ac.Add("KINDCODE", TvList.getValue(this.ytComboBox_KindCode).ToString()); ac.Add("COUNTCODE", TvList.getValue(this.ytComboBox_CountCode).ToString()); if (this.selTextInpt_PRODUCTPLACE.Value != null) { ac.Add("PRODUCTPLACE", this.selTextInpt_PRODUCTPLACE.Text); } else { ac.Add("PRODUCTPLACE", this.selTextInpt_PRODUCTPLACE.textBox1.Text); } ac.Add("GG", this.yTextBox_GuiG.Text); ac.Add("XH", this.yTextBox_XH.Text); ac.Add("UNITCODE", TvList.getValue(this.ytComboBox_SingerCode).ToString()); ac.Add("WORKUNITCODE", TvList.getValue(this.ytComboBox_WORKUNITCODE).ToString()); ac.Add("IFJL", TvList.getValue(this.ytComboBox_IFJL).ToString()); ac.Add("ZJTYPE", TvList.getValue(this.ytComboBox_ZJTYPE).ToString()); ac.Add("ZJRATE", this.yTextBox_ZJRATE.Text); ac.Add("TXM", this.yTextBox_TiaoXM.Text); ac.Add("IFUSE", TvList.getValue(this.ytComboBox_ifUse).ToInt()); ac.Add("MEMO", this.yTextBox_Rec.Text); ac.Add("USERID", His.his.UserId); ac.Add("USERNAME", His.his.UserName); ac.Add("CHOSCODE", His.his.Choscode); if (!isAdd) { ac.Add("EQID", r["EQID"]); } else { ac.Add("EQID", null); } ac.ServiceLoad += new YtClient.data.events.LoadEventHandle(ac_ServiceLoad); ac.ServiceFaiLoad += new YtClient.data.events.LoadFaiEventHandle(ac_ServiceFaiLoad); ac.Post(); }
private void btn_Save_Click(object sender, EventArgs e) { if (this.selTextInpt_QGKSID.Value == null || this.selTextInpt_QGKSID.Value.Trim().Length == 0) { WJs.alert("请输入设备ID!"); this.yTextBox_Name.Focus(); return; } if (this.selTextInpt_QGKSID.Value == null) { WJs.alert("请选择请购科室!"); selTextInpt_QGKSID.Focus(); return; } if (this.selTextInpt_Country.Text.Trim().ToString() != "中国" && this.selTextInpt_Country.Value == null) { WJs.alert("请选择国别!"); selTextInpt_Country.Focus(); return; } if (this.yTextBox_QGNum.Text.Trim().Length <= 0) { WJs.alert("请输入请购数量!"); yTextBox_QGNum.Focus(); return; } else { if (!int.TryParse(this.yTextBox_QGNum.Text, out a) || a < 0) { WJs.alert("请购数量必须是大于零的整数!"); yTextBox_QGNum.Focus(); return; } } if (this.yTextBox_YJPRICE.Text.Trim().Length > 0) { decimal dec; if (decimal.TryParse(this.yTextBox_YJPRICE.Text.Trim(), out dec)) { if (dec < 0) { WJs.alert("预计单价必须是大于零的实数!"); yTextBox_YJPRICE.Focus(); return; } } else { WJs.alert("预计单价必须是大于零的实数!"); yTextBox_YJPRICE.Focus(); return; } } if (this.yTextBox_YJMONEY.Text.Trim().Length <= 0) { WJs.alert("系统错误,请重新开始!"); return; } ActionLoad ac = ActionLoad.Conn(); ac.Action = "LKWZSVR.lkeq.EQPurchase.EQAskBuySvr"; ac.Sql = "SaveEQAskBuyInfo"; ac.Add("DEPTID", this.selTextInpt_QGKSID.Value); ac.Add("EQID", this.selTextInpt_EQID.Text); ac.Add("EQNAME", this.yTextBox_Name.Text); ac.Add("GG", this.yTextBox_GuiG.Text); ac.Add("XH", this.yTextBox_XH.Text); ac.Add("COUNTRY", this.selTextInpt_Country.Text); ac.Add("UNITCODE", TvList.getValue(this.ytComboBox_Unitcode).ToString()); ac.Add("APPLYNUM", this.yTextBox_QGNum.Text); ac.Add("YJPRICE", this.yTextBox_YJPRICE.Text); ac.Add("YJMONEY", this.yTextBox_YJMONEY.Text); ac.Add("REASON", this.yTextBox_REASON.Text); ac.Add("XYFX", this.yTextBox_XYFX.Text); ac.Add("PTTJ", this.yTextBox_PTTJ.Text); ac.Add("PLANDATE", this.ytDateTime_MakeTime.Value); ac.Add("STATUS", TvList.getValue(this.ytComboBox_Status).ToString()); ac.Add("MEMO", this.yTextBox_Rec.Text); ac.Add("USERID", His.his.UserId); ac.Add("USERNAME", His.his.UserName); ac.Add("RECDATE", this.ytDateTime_RECDATE.Value); ac.Add("CHOSCODE", His.his.Choscode); if (!isAdd) { ac.Add("APPLYID", r["APPLYID"]); } else { ac.Add("APPLYID", null); } ac.ServiceLoad += new YtClient.data.events.LoadEventHandle(ac_ServiceLoad); ac.ServiceFaiLoad += new YtClient.data.events.LoadFaiEventHandle(ac_ServiceFaiLoad); ac.Post(); }
private void button1_Click(object sender, EventArgs e) { ActionLoad bc = ActionLoad.Conn(); bc.Action = "LKWZSVR.lkeq.JiChuDictionary.EQKind"; if (this.isAdd) { //保存 bc.Sql = "SaveEQKindInfo"; } else { //修改 bc.Sql = "UpdataEQKindInfo"; bc.Add("SELECTCODE", r["KINDCODE"].ToString()); } if (this.yTextBox_Name.Text.Trim().Length <= 0) { WJs.alert("请填写类别名称"); this.yTextBox_Name.Focus(); return; } else { bc.Add("KINDNAME", this.yTextBox_Name.Text); } bc.Add("PYCODE", this.yTextBox_PY.Text); bc.Add("WBCODE", this.yTextBox_WB.Text); if (this.ytComboBox_ifUse.Value == null) { WJs.alert("请选择是否使用"); this.ytComboBox_ifUse.Focus(); return; } else { bc.Add("IFUSE", TvList.getValue(this.ytComboBox_ifUse).ToInt()); } if (this.ytComboBox_IfEnd.Value == null) { WJs.alert("请选择是否末节点"); this.ytComboBox_IfEnd.Focus(); return; } else { bc.Add("IFEND", TvList.getValue(this.ytComboBox_IfEnd).ToInt()); } bc.Add("USERID", His.his.UserId); bc.Add("USERNAME", His.his.UserName); bc.Add("CHOSCODE", His.his.Choscode); if (yTextBox_Rec != null) { bc.Add("MEMO", this.yTextBox_Rec.Text); } else { bc.Add("MEMO", null); } if (yTextBox_UserID.Text.Trim().Length <= 0) { WJs.alert("请输入设备卡号前缀字符!"); this.yTextBox_UserID.Focus(); return; } else { bc.Add("PREFIX", this.yTextBox_UserID.Text); } bc.Add("KINDCODE", this.yTextBox_LeiCode.Text); bc.Add("SUPERCODE", this.yTextBox_UpCode.Text); bc.ServiceLoad += new YtClient.data.events.LoadEventHandle(ac_ServiceLoad); bc.Post(); }
private void btn_Save_Click(object sender, EventArgs e) { if (this.yTextBox_Name.Text.Trim().Length == 0) { WJs.alert("请输入厂商名称!"); this.yTextBox_Name.Focus(); return; } if (this.ytComboBox_IfMake.SelectedIndex == -1) { WJs.alert("请选择是否生产厂家!"); ytComboBox_IfMake.Focus(); return; } if (this.ytComboBox_IfAfford.SelectedIndex == -1) { WJs.alert("请选择是否供应商!"); ytComboBox_IfAfford.Focus(); return; } if (this.ytComboBox_ifUse.SelectedIndex == -1) { WJs.alert("请选择是否使用!"); ytComboBox_ifUse.Focus(); return; } ActionLoad ac = ActionLoad.Conn(); ac.Action = "LKWZSVR.lkeq.JiChuDictionary.EQSupplySvr"; ac.Sql = "SaveChangShangInfo"; ac.Add("IFFACTORY", TvList.getValue(this.ytComboBox_IfMake).ToInt()); ac.Add("IFSUPPLY", TvList.getValue(this.ytComboBox_IfAfford).ToInt()); ac.Add("IFUSE", TvList.getValue(this.ytComboBox_ifUse).ToInt()); ac.Add("SUPPLYNAME", this.yTextBox_Name.Text); ac.Add("USERID", His.his.UserId); ac.Add("USERNAME", His.his.UserName); ac.Add("CHOSCODE", His.his.Choscode); ac.Add("PYCODE", this.yTextBox_PY.Text); ac.Add("WBCODE", this.yTextBox_WB.Text); ac.Add("UNITPROPERTY", TvList.getValue(this.ytComboBox_Pperty).ToInt()); ac.Add("QYDM", this.yTextBox_QYDM.Text); ac.Add("FRDB", this.yTextBox_FRDB.Text); ac.Add("UNITBANK", this.yTextBox_Bank.Text); ac.Add("BANKACCOUNT", this.yTextBox_BANKACCOUNT.Text); ac.Add("ADDRESS", this.yTextBox_Address.Text); ac.Add("RELMAN", this.yTextBox_RELMAN.Text); ac.Add("RELPHONE", this.yTextBox_Phone.Text); ac.Add("POST", this.yTextBox_POST.Text); ac.Add("FAX", this.yTextBox_Fax.Text); ac.Add("JYXKZ", this.yTextBox_JYXKZ.Text); ac.Add("YYZZ", this.yTextBox_YYZZ.Text); ac.Add("MEMO", this.yTextBox_Rec.Text); ac.Add("TAXCODE", this.yTextBox_SWDJH.Text); if (!isAdd) { ac.Add("SUPPLYID", Info["厂商ID"].ToInt()); } else { ac.Add("SUPPLYID", null); } ac.ServiceLoad += new YtClient.data.events.LoadEventHandle(ac_ServiceLoad); ac.ServiceFaiLoad += new YtClient.data.events.LoadFaiEventHandle(ac_ServiceFaiLoad); ac.Post(); }