| | |
| | | { |
| | | public partial class Frm_Cqsq : DevExpress.XtraEditors.XtraForm |
| | | { |
| | | string _webServiceName = "MesCgthSqManager/"; |
| | | string _webServiceName = "RkqcSqManager/"; |
| | | List<FilterEntity> _filterList = new List<FilterEntity>(); |
| | | public Frm_Cqsq() |
| | | { |
| | |
| | | return; |
| | | } |
| | | var frm = new SelectCqsq(this.txt_kcOrgId.GetId()); |
| | | ////赋值给明细表 |
| | | //赋值给明细表 |
| | | frm.UpdateParent += (ss, ee) => |
| | | { |
| | | |
| | | try |
| | | { |
| | | var lst = ee.DynamicList; |
| | | DataTable _Table = (DataTable)gcMx1.DataSource; |
| | | foreach (dynamic dym in lst) |
| | | { |
| | | DataRow _row = _Table.NewRow(); |
| | | _row["guid"] = "";//明细guid |
| | | _row["pGuid"] = "";//主表guid |
| | | _row["itemBarCode"] = dym.itemBarCode; |
| | | _row["itemId"] = dym.itemId; |
| | | _row["itemNo"] = dym.itemNo; |
| | | _row["itemName"] = dym.itemName; |
| | | _row["itemModel"] = dym.itemModel; |
| | | _Table.Rows.Add(_row); |
| | | } |
| | | gcMx1.BindingContext = new BindingContext(); |
| | | gcMx1.DataSource = _Table; |
| | | gcMx1.ForceInitialize(); |
| | | gvMx1.CloseEditor(); |
| | | gvMx1.PostEditor(); |
| | | gvMx1.UpdateCurrentRow(); |
| | | gvMx1.BestFitColumns(); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gvMx1); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MessageBox.Show(ex.Message); |
| | | } |
| | | }; |
| | | frm.ShowDialog(); |
| | | }; |
| | |
| | | else |
| | | { |
| | | List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>(); |
| | | gvList.Add(gvMx1); |
| | | gvList.Add(gvMx2); |
| | | UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, true, gvList); |
| | | } |
| | | } |
| | |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 4); |
| | | List<DevExpress.XtraGrid.Views.Grid.GridView> gridViews = new List<DevExpress.XtraGrid.Views.Grid.GridView>(); |
| | | gridViews.Add(gvMx1); |
| | | gridViews.Add(gvMx2); |
| | | UtilityHelper.CleanValueByControl(this.layoutMx1.Controls, true, gridViews); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMx1, gvMx1); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMx2, gvMx2); |
| | | //增加时,默认组织 |
| | | string deftOrg = UtilityHelper.GetFirstOrg(txt_kcOrgId); |
| | | |
| | |
| | | { |
| | | Guid = Gs.DevApp.ToolBox.UtilityHelper.ToGuid(lbGuid.Text.Trim()), //到货单主键 |
| | | Remark = txt_remark.Text.Trim(), //备注 |
| | | BillType = txt_billType.Text,//退料方式 |
| | | BillType = txt_billType.Text, |
| | | KcOrgId = _orgId, |
| | | list = new List<dynamic>(), |
| | | }; |
| | |
| | | if (row != null) |
| | | { |
| | | Guid _guid = UtilityHelper.ToGuid(row["guid"].ToString()); |
| | | string _msl = row["sqsl"].ToString(); |
| | | if (string.IsNullOrEmpty(_msl)) |
| | | { |
| | | MsgHelper.ShowError("申请数量不能为空!"); |
| | | return; |
| | | } |
| | | _obj.list.Add(new |
| | | { |
| | | Guid = _guid, |
| | | DepotSectionCode = row["depotSectionCode"].ToString(), |
| | | Gqsl = row["gqsl"].ToString(), |
| | | ItemId = row["itemId"].ToString(), |
| | | ItemBarCode = row["itemBarCode"].ToString(), |
| | | }); |
| | | } |
| | | } |
| | |
| | | _webServiceName + "EditModel", |
| | | JsonConvert.SerializeObject(_obj)); |
| | | var _rtn = UtilityHelper.ReturnToDynamic(strJson); |
| | | |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | MsgHelper.ShowInformation("提示:" + _rtn.rtnMsg); |
| | |
| | | txt_billNo.Text = _rtn.rtnData.outNo; |
| | | toolBarMenu1.isSetBtn = true; |
| | | List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>(); |
| | | gvList.Add(gvMx1); |
| | | gvList.Add(gvMx2); |
| | | UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, false, gvList); |
| | | toolBarMenu1.currentAction = ""; |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 6); |
| | |
| | | { |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMx1, gvMx1); |
| | | } |
| | | |
| | | JArray array2 = new JArray(); |
| | | foreach (var a in _job["rtnData"]["list2"]) |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 删除明细 |
| | | /// 移出明细 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | |
| | | var _rtn = UtilityHelper.ReturnToDynamic(strJson); |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | if (_rtn.rtnCode > 0) getModel(lbGuid.Text); |
| | | getModel(lbGuid.Text); |
| | | } |
| | | MsgHelper.Warning("提示:" + _rtn.rtnMsg); |
| | | } |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | } |