private void UsetoolStripButton_Click(object sender, EventArgs e) { Dictionary <string, ObjItem> dr = this.dataGView1.getRowData(); if (dr != null) { if (dr["是否使用"].ToString() == "0") { if (WJs.confirmFb("您确定要启用选择的设备库房吗?")) { ActionLoad ac = ActionLoad.Conn(); ac.Action = "LKWZSVR.lkeq.JiChuDictionary.EQWare"; ac.Sql = "Enab"; ac.Add("ifuse", "1"); ac.Add("choscode", His.his.Choscode.ToString()); ac.Add("warecode", dr["库房编码"].ToString()); ac.SetKeyValue("warecode,choscode"); ac.ServiceLoad += new YtClient.data.events.LoadEventHandle(ac_ServiceLoad); ac.Post(); reLoad(); } } else { WJs.alert("该设备库房已经启用了"); } } else { WJs.alert("请选择要启用的设备库房信息!"); } }
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(); }
private void AddEQWareInfoForSave(ActionLoad ac) { ac.Add("choscode", this.choscode_yTextBox1.Text); ac.Add("warename", this.warename_yTextBox1.Text); ac.Add("deptid", this.selTextInpt1.Value); ac.Add("pycode", this.pycode_yTextBox.Text); ac.Add("wbcode", this.wbcode_yTextBox.Text); if (this.ifuse_ytComboBox.SelectedIndex > -1) { if (this.ifuse_ytComboBox.SelectedItem.ToString() == "启用") { ac.Add("ifuse", 1); } else { ac.Add("ifuse", 0); } } if (this.ifall_ytComboBox.SelectedIndex > -1) { if (this.ifall_ytComboBox.SelectedItem.ToString() == "是") { ac.Add("ifall", 1); } else { ac.Add("ifall", 0); } } ac.Add("userid", this.userid_yTextBox.Text); ac.Add("username", this.username_yTextBox.Text); ac.Add("recdate", this.dateTimePicker1.Value); ac.Add("memo", this.memo_yTextBox.Text); if (isFlag == 1) { //修改时需要自己获取库房编码,否则自动生成 ac.Add("warecode", dr["库房编码"].ToString()); ac.SetKeyValue("warecode,choscode"); } }
private void DeltoolStripButton_Click(object sender, EventArgs e) { Dictionary <string, ObjItem> dr = this.dataGView1.getRowData(); if (dr != null) { if (WJs.confirmFb("您确定要删除选择的设备库房吗?")) { ActionLoad ac = ActionLoad.Conn(); ac.Action = "LKWZSVR.lkeq.JiChuDictionary.EQWare"; ac.Sql = "Del"; ac.Add("CHOSCODE", His.his.Choscode.ToString()); ac.Add("WARECODE", dr["库房编码"].ToString()); ac.SetKeyValue("WARECODE,CHOSCODE"); ac.ServiceLoad += new YtClient.data.events.LoadEventHandle(ac_ServiceLoad); ac.Post(); reLoad(); } } else { WJs.alert("请选择要删除的设备库房信息!"); } }