private void btnEnter_Click(object sender, EventArgs e) { if (this.txt仓库名称.Text.Trim() == string.Empty) { AppServer.ShowMsg_Warn("当前输入框不允许为空!"); this.txt仓库名称.Focus(); } try { Ref_WS_STK.DataType_仓库 model = new Ref_WS_STK.DataType_仓库(); model.级编码 = this.SUPcode; model.仓库编码 = this.CWXCode; model.LoginUserCode = AppServer.LoginUserCode; TY.Helper.FormHelper.DataBinding_DataSourceToModel(this, model); model.ExAction = this.Tag.ToString(); AppServer.UsingWcf(() => { AppServer.wcfClient.BAS_储物箱_Edit(ref model); }); } catch (Exception ex) { AppServer.ShowMsg_ExceptError(ex.Message); } this.DialogResult = DialogResult.OK; }
private bool PostData() { if (this.cbx上级编码.SelectedIndex == -1) { AppServer.ShowMsg_Warn("请选择货架所在仓库"); return(false); } if (String.IsNullOrWhiteSpace(this.txt仓库名称.Text)) { AppServer.ShowMsg("货架名称不能为空或是全部空格"); return(false); } // var model = new Ref_WS_STK.DataType_仓库(); model.ExAction = this.Tag.ToString(); model.仓库编码 = this.HJCode; model.LoginUserCode = AppServer.LoginUserCode; TY.Helper.FormHelper.DataBinding_DataSourceToModel(this, model); AppServer.UsingWcf(() => { AppServer.wcfClient.BAS_货架_Edit(ref model); }); // if (model.ExResult != 0) { AppServer.ShowMsg_Error(model.ErrorMsg); return(false); } if (this.OnAddNewDataEvent != null) { this.OnAddNewDataEvent((string)this.cbx上级编码.SelectedValue); } return(true); }
private void btnDel_Click(object sender, EventArgs e) { if (this.dbGridView.Rows.Count == 0) { return; } if (!AppServer.DialogMsg("确定要删除该储物箱")) { return; } // var model = new Ref_WS_STK.DataType_仓库(); model.ExAction = "Del"; foreach (DataGridViewRow Row in this.dbGridView.SelectedRows) { model.仓库编码 = Row.Cells["仓库编码"].Value.ToString(); AppServer.UsingWcf(() => { AppServer.wcfClient.BAS_储物箱_Edit(ref model); }); } // if (model.ExResult != 0) { AppServer.ShowMsg_Error(model.ErrorMsg); } else { this.DataBinding_dbGridView(0); } }
private void DataBinding_dbTreeView() { base.Cursor = Cursors.WaitCursor; try { var model = new Ref_WS_STK.DataType_仓库(); model.ExAction = "Tree"; model.级编码 = this.CKCode; AppServer.UsingWcf(() => { this.dbTreeView.DataSource = AppServer.wcfClient.BAS_仓库_List(model).Tables[0]; }); // this.dbTreeView.ClearTrees(); this.dbTreeView.NodeID = "仓库编码"; this.dbTreeView.NodePID = "上级编码"; this.dbTreeView.NodeTitle = "仓库名称"; this.dbTreeView.BuildTrees(); this.dbTreeView.Nodes[0].Expand(); this.dbTreeView.SelectedNode = (DBTreeNode)this.dbTreeView.Nodes[0]; } catch (Exception ex) { AppServer.ShowMsg_ExceptError(ex.Message); return; } finally { base.Cursor = Cursors.Arrow; } }
private void btnEnter_Click(object sender, EventArgs e) { if (String.IsNullOrWhiteSpace(this.txt仓库名称.Text)) { AppServer.ShowMsg("仓库名称不能为空或者空格"); return; } // var model = new Ref_WS_STK.DataType_仓库(); model.ExAction = this.Tag.ToString(); model.仓库编码 = this.CKCode; model.LoginUserCode = AppServer.LoginUserCode; model.仓库负责人 = (string)this.cbx仓管员.SelectedValue; TY.Helper.FormHelper.DataBinding_DataSourceToModel(this, model); AppServer.UsingWcf(() => { AppServer.wcfClient.BAS_仓库_Edit(ref model); }); // if (model.ExResult != 0) { AppServer.ShowMsg_Error(model.ErrorMsg); } else { DialogResult = System.Windows.Forms.DialogResult.OK; } }
private void dbTreeView_AfterSelect(object sender, TreeViewEventArgs e) { var model = new Ref_WS_STK.DataType_仓库(); model.ExAction = "List"; model.级编码 = (e.Node as DBTreeNode).ID; AppServer.UsingWcf(() => { this.dbGridView.DataSource = AppServer.wcfClient.BAS_货架_List(model).Tables[0]; }); }
public void DataBinding_dbGridView(int ARowIndex) { var model = new Ref_WS_STK.DataType_仓库(); model.ExAction = "SLCCK"; AppServer.UsingWcf(() => { this.dbGridView.DataSource = AppServer.wcfClient.BAS_仓库_List(model).Tables[0]; }); // this.dbGridView.GoToRowByIndex(ARowIndex); }
private void DataBinding_cbx仓库编码() { var model = new Ref_WS_STK.DataType_仓库(); model.ExAction = "AllCK"; AppServer.UsingWcf(() => { this.cbx仓库编码.ValueMember = "仓库编码"; this.cbx仓库编码.DisplayMember = "仓库名称"; this.cbx仓库编码.DataSource = AppServer.wcfClient.BAS_仓库_List(model).Tables[0]; }); }
public void DataBinding_dbGridView(int ARowIndex) { var model = new Ref_WS_STK.DataType_仓库(); TY.Helper.FormHelper.DataBinding_DataSourceToModel(this, model); AppServer.UsingWcf(() => { this.dbGridView.DataSource = AppServer.wcfClient.BAS_储物箱_List(model).Tables[0]; }); // this.lbl查询记录.Text = String.Format("共有{0}条记录", this.dbGridView.RowCount.ToString()); // this.dbGridView.GoToRowByIndex(ARowIndex); }
public void DataBinding_dbGridView(int ARowIndex) { var model = new Ref_WS_STK.DataType_仓库(); model.仓库编码 = (string)this.cbx仓库编码.SelectedValue; model.仓库名称 = this.txt货架名称.Text; model.ExAction = "SLCHJ"; AppServer.UsingWcf(() => { this.dbGridView.DataSource = AppServer.wcfClient.BAS_货架_List(model).Tables[0]; }); // this.lbl查询记录.Text = String.Format("共有 {0} 条记录", this.dbGridView.RowCount.ToString()); // this.dbGridView.GoToRowByIndex(ARowIndex); }
private void DataBinding_cbx上级编码() { Ref_WS_STK.DataType_仓库 model = new Ref_WS_STK.DataType_仓库(); model.ExAction = "SLCHJ"; model.仓库编码 = (string)this.cbx仓库编码.SelectedValue; model.包含所有项 = 1; // DataTable dt = null; AppServer.UsingWcf(() => { dt = AppServer.wcfClient.BAS_货架_List(model).Tables[0]; }); this.cbx上级编码.DisplayMember = "仓库名称"; this.cbx上级编码.ValueMember = "仓库编码"; this.cbx上级编码.DataSource = dt; // this.cbx上级编码.SelectedIndex = 0; }
private void DataBinding_cbx仓库() { DataTable dt = null; // Ref_WS_STK.DataType_仓库 model = new Ref_WS_STK.DataType_仓库(); model.ExAction = "ALLCK"; AppServer.UsingWcf(() => { dt = AppServer.wcfClient.BAS_仓库_List(model).Tables[0]; }); // this.cbx仓库编码.ValueMember = "仓库编码"; this.cbx仓库编码.DisplayMember = "仓库名称"; this.cbx仓库编码.DataSource = dt; // if (this.cbx仓库编码.Items.Count > 0) { this.cbx仓库编码.SelectedIndex = 0; } }
private void btnEnter_Click(object sender, EventArgs e) { var model = new Ref_WS_STK.DataType_仓库(); model.ExAction = "Bind"; model.MxDataXML = (this.dbGridView_CWX.DataSource as DataTable).ToXml("ar"); AppServer.UsingWcf(() => { AppServer.wcfClient.BAS_储物箱_Edit(ref model); }); // if (model.ExResult != 0) { AppServer.ShowMsg_Error(model.ErrorMsg); return; } else { this.DialogResult = System.Windows.Forms.DialogResult.OK; } }
private void DataBinding_cbx货架() { Ref_WS_STK.DataType_仓库 model = new Ref_WS_STK.DataType_仓库(); model.ExAction = "SLCHJ"; model.级编码 = this.cbx仓库编码.SelectedIndex > -1 ? (string)this.cbx仓库编码.SelectedValue : ""; DataTable dt = null; AppServer.UsingWcf(() => { dt = AppServer.wcfClient.BAS_货架_List(model).Tables[0]; }); this.cbx上级编码.DisplayMember = "仓库名称"; this.cbx上级编码.ValueMember = "仓库编码"; this.cbx上级编码.DataSource = dt; if (this.cbx上级编码.Items.Count == 0) { AppServer.ShowMsg_Warn("当前仓库尚未分配货架,请前往货架设置进行设置!"); this.btnEnter.Enabled = false; } else { this.btnEnter.Enabled = true; } }