| | |
| | | private void ToolBarMenu1_btnDelClick1(object sender, EventArgs e) |
| | | { |
| | | string rowGuid = "", rowName = ""; |
| | | (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_qtck, gridView1, "qtck"); |
| | | (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_qtck, gridView1, "qtck"); |
| | | if (string.IsNullOrEmpty(rowGuid)) |
| | | { |
| | | ToolBox.MsgHelper.Warning("请先选择你要操作的行!"); |
| | |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnSaveClick(object sender, EventArgs e) |
| | | { |
| | | //toolBarMenu1.isSetBtn = false; |
| | | //string inGys = txt_qt018.GetId(); |
| | | //string inCjId = txt_qt011.GetId(); |
| | | //if (string.IsNullOrEmpty(inGys)) |
| | | //{ |
| | | // Gs.DevApp.ToolBox.MsgHelper.Warning("请选择供应商!"); |
| | | // txt_qt018.Focus(); |
| | | // return; |
| | | //} |
| | | //if (string.IsNullOrEmpty(inCjId)) |
| | | //{ |
| | | // Gs.DevApp.ToolBox.MsgHelper.Warning("请选择仓库!"); |
| | | // txt_qt011.Focus(); |
| | | // return; |
| | | //} |
| | | //var _obj = new |
| | | //{ |
| | | // guid = UtilityHelper.ToGuid(lbGuid.Text.Trim()), //主建 |
| | | // inRklb = txt_qt003.Text.Trim(),//备注 |
| | | // inYwlx = txt_qt004.Text.Trim(),//业务类型 |
| | | // inRkfs = txt_qt019.Text.Trim(),//入库方式 |
| | | // inRklx = txt_qt020.Text.Trim(),//入库类型 |
| | | // inGys = inGys,//供应商 |
| | | // inCjId = inCjId,//入库仓库 |
| | | // inDepart = txt_qt009.Text.Trim(),//申请部门 |
| | | // inXsdh = txt_qt021.Text.Trim(),//销售单号 |
| | | // inRkyy = txt_qt010.Text.Trim(),//入库原因 |
| | | // list = new List<dynamic>(), |
| | | //}; |
| | | //gvMx1.CloseEditor(); |
| | | //gvMx1.UpdateCurrentRow(); |
| | | //if (gvMx1.DataRowCount <= 0) |
| | | //{ |
| | | // MsgHelper.ShowError("明细不能为空,请选择你的收料明细!"); |
| | | // return; |
| | | //} |
| | | //for (var i = 0; i < gvMx1.DataRowCount; i++) |
| | | //{ |
| | | // var row = gvMx1.GetDataRow(i); |
| | | // if (row != null) |
| | | // { |
| | | // Guid? _guid = UtilityHelper.ToGuid(row["guid"].ToString()); |
| | | // //string _msl = row["quantity"].ToString(); |
| | | // //if (string.IsNullOrEmpty(_msl)) |
| | | // //{ |
| | | // // MsgHelper.ShowError("数量不能为空!"); |
| | | // // return; |
| | | // //} |
| | | // _obj.list.Add(new |
| | | // { |
| | | // Guid = _guid, |
| | | // ItemId = (row["itemId"].ToString()), |
| | | // Sqsl = (row["qd007"].ToString()), |
| | | // Bz = (row["qd010"].ToString()), |
| | | // }); |
| | | // } |
| | | //} |
| | | //try |
| | | //{ |
| | | // string strJson = UtilityHelper.HttpPost("", _webServiceName + "EditModel", JsonConvert.SerializeObject(_obj)); |
| | | // ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson); |
| | | // ToolBox.MsgHelper.Warning("提示:" + _rtn.rtnMsg); |
| | | // if (_rtn.rtnCode > 0) |
| | | // { |
| | | // lbGuid.Text = _rtn.rtnData; |
| | | // toolBarMenu1.isSetBtn = true; |
| | | // UtilityHelper.ChangeEnableByControl(this.panel1.Controls, false); |
| | | // } |
| | | //} |
| | | //catch (Exception ex) |
| | | //{ |
| | | // ToolBox.MsgHelper.Warning("提示:" + ex.Message); |
| | | //} |
| | | toolBarMenu1.isSetBtn = false; |
| | | string inCusId = txt_qt018.GetId(); |
| | | string inCkId = txt_qt008.GetId(); |
| | | string inLlrId = txt_qt022.GetId(); |
| | | string inDepart = txt_qt009.GetId(); |
| | | string inScgdId = txt_qt006.Text.Trim(); |
| | | if (string.IsNullOrEmpty(inCusId)) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("请选择客户!"); |
| | | txt_qt018.Focus(); |
| | | return; |
| | | } |
| | | if (string.IsNullOrEmpty(inCkId)) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("请选择仓库!"); |
| | | txt_qt008.Focus(); |
| | | return; |
| | | } |
| | | if (string.IsNullOrEmpty(inLlrId)) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("请选择领料人!"); |
| | | txt_qt022.Focus(); |
| | | return; |
| | | } |
| | | var _obj = new |
| | | { |
| | | guid = UtilityHelper.ToGuid(lbGuid.Text.Trim()), //主建 |
| | | inRklb = txt_qt003.Text.Trim(),//业务类别 |
| | | inYwlx = txt_qt004.Text.Trim(),//业务类型 |
| | | inRkfs = txt_qt019.Text.Trim(),//入库方式 |
| | | inRklx = txt_qt020.Text.Trim(),//入库类型 |
| | | inCusId = inCusId,//客户 |
| | | inCkId = inCkId,//仓库 |
| | | inDepart = inDepart,//申请部门 |
| | | inXsdh = txt_qt021.Text.Trim(),//销售单号 |
| | | inScgdId = inScgdId,//生产工单号 |
| | | inLlrId = inLlrId,//领料人 |
| | | inRkyy = txt_qt010.Text.Trim(),//原因 |
| | | list = new List<dynamic>(), |
| | | }; |
| | | gvMx1.CloseEditor(); |
| | | gvMx1.UpdateCurrentRow(); |
| | | if (gvMx1.DataRowCount <= 0) |
| | | { |
| | | MsgHelper.ShowError("明细不能为空,请选择你的收料明细!"); |
| | | return; |
| | | } |
| | | for (var i = 0; i < gvMx1.DataRowCount; i++) |
| | | { |
| | | var row = gvMx1.GetDataRow(i); |
| | | if (row != null) |
| | | { |
| | | Guid? _guid = UtilityHelper.ToGuid(row["guid"].ToString()); |
| | | //string _msl = row["quantity"].ToString(); |
| | | //if (string.IsNullOrEmpty(_msl)) |
| | | //{ |
| | | // MsgHelper.ShowError("数量不能为空!"); |
| | | // return; |
| | | //} |
| | | _obj.list.Add(new |
| | | { |
| | | Guid = _guid, |
| | | ItemId = (row["itemId"].ToString()), |
| | | Sqsl = (row["qd007"].ToString()), |
| | | Bz = (row["qd010"].ToString()), |
| | | }); |
| | | } |
| | | } |
| | | try |
| | | { |
| | | string strJson = UtilityHelper.HttpPost("", _webServiceName + "EditModel", JsonConvert.SerializeObject(_obj)); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson); |
| | | ToolBox.MsgHelper.Warning("提示:" + _rtn.rtnMsg); |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | lbGuid.Text = _rtn.rtnData; |
| | | toolBarMenu1.isSetBtn = true; |
| | | UtilityHelper.ChangeEnableByControl(this.panel1.Controls, false); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | ToolBox.MsgHelper.Warning("提示:" + ex.Message); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | gvMx1.SetFocusedRowCellValue("qd003", SelectedDataRow["itemName"]); |
| | | gvMx1.SetFocusedRowCellValue("qd004", SelectedDataRow["itemModel"]); |
| | | } |
| | | |
| | | |
| | | private void repositoryItemSearchLookUpEdit1_EditValueChanged_1(object sender, EventArgs e) |
| | | { |
| | | SearchLookUpEdit LookupEdit = sender as SearchLookUpEdit; |