| | |
| | | using DevExpress.XtraEditors; |
| | | using DevExpress.XtraGrid.Views.Grid; |
| | | using DevExpress.XtraGrid.Views.Grid.ViewInfo; |
| | | using Gs.DevApp.Entity; |
| | | using Gs.DevApp.ToolBox; |
| | | using Gs.DevApp.UserControl; |
| | |
| | | { |
| | | public partial class Frm_MesInvItemMoves : DevExpress.XtraEditors.XtraForm |
| | | { |
| | | string _webServiceName = "User/"; |
| | | string _webServiceName = "MesInvItemMovesManager/"; |
| | | List<FilterEntity> _filterList = new List<FilterEntity>(); |
| | | public Frm_MesInvItemMoves() |
| | | { |
| | |
| | | Rectangle r = new Rectangle(gridView1.GridControl.Width / 2 - 100, e.Bounds.Top + 45, e.Bounds.Right - 5, e.Bounds.Height - 5); |
| | | e.Graphics.DrawString(str, f, Brushes.Gray, r); |
| | | }; |
| | | |
| | | gvMx1.ValidatingEditor += (sender, e) => |
| | | { |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetValidatingEditor(sender, e); |
| | | }; |
| | | |
| | | var _obj = new |
| | | { |
| | | currentPage = 1, |
| | |
| | | MsgHelper.Warning("提示:" + ex.Message); |
| | | } |
| | | } |
| | | private async void GridView1_ColumnFilterChanged(object sender, EventArgs e) |
| | | |
| | | |
| | | private void GridView1_ColumnFilterChanged(object sender, EventArgs e) |
| | | { |
| | | _filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns); |
| | | await Task.Delay(100); |
| | | Task.Delay(100); |
| | | getPageList(1); |
| | | } |
| | | /// <summary> |
| | |
| | | private void ToolBarMenu1_btnSaveClick(object sender, EventArgs e) |
| | | { |
| | | toolBarMenu1.isSetBtn = false; |
| | | //if (string.IsNullOrEmpty(txt_account.Text.Trim())) |
| | | string _fromDepotsId = txt_fromDepotsId.GetId(); |
| | | string _invDepotsId = txt_invDepotsId.GetId(); |
| | | if (string.IsNullOrEmpty(_fromDepotsId)) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("登录账号不能为空!"); |
| | | // txt_account.Focus(); |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("发料仓不能为空!"); |
| | | txt_fromDepotsId.Focus(); |
| | | return; |
| | | } |
| | | if (string.IsNullOrEmpty(_invDepotsId)) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("收料仓不能为空!"); |
| | | txt_invDepotsId.Focus(); |
| | | return; |
| | | } |
| | | var _obj = new |
| | | { |
| | | guid = UtilityHelper.ToGuid(lbGuid.Text.Trim()), //主建 |
| | | inFromDepotsId = _fromDepotsId,//发料仓 |
| | | inInvDepotsId = _invDepotsId,//收料仓 |
| | | inBz = txt_remark.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["quantity"].ToString()), |
| | | Bz = (row["remark"].ToString()), |
| | | }); |
| | | } |
| | | } |
| | | try |
| | | { |
| | | string strJson = UtilityHelper.HttpPost("", _webServiceName + "EditModel", JsonConvert.SerializeObject(_obj)); |
| | |
| | | /// </summary> |
| | | /// <param name="curPage">第几页</param> |
| | | /// <param name="pageSize">每页几条</param> |
| | | private async void getPageList(int curPage) |
| | | private void getPageList(int curPage) |
| | | { |
| | | UcLoading _loading = new UcLoading(); |
| | | |
| | | var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList); |
| | | PageQueryModel pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "create_date", "asc", "", _sbSqlWhere.ToString()); |
| | | string json = JsonConvert.SerializeObject(pgq); |
| | | try |
| | | { |
| | | var strReturn = await UtilityHelper.HttpPostAsync("", _webServiceName + "GetListPage", json); |
| | | var strReturn = UtilityHelper.HttpPost("", _webServiceName + "GetListPage", json); |
| | | ReturnModel<PageListModel> dd = UtilityHelper.ReturnToTablePage(strReturn); |
| | | if (dd.rtnCode > 0) |
| | | { |
| | |
| | | { |
| | | ToolBox.MsgHelper.ShowError("提示:" + ex.Message); |
| | | } |
| | | _loading.Stop(); |
| | | |
| | | } |
| | | private void getModel(string strGuid, bool isEdit, int tabIdx) |
| | | { |
| | |
| | | { |
| | | SearchLookUpEdit LookupEdit = sender as SearchLookUpEdit; |
| | | DataRowView SelectedDataRow = (DataRowView)LookupEdit.GetSelectedDataRow(); |
| | | gvMx1.SetFocusedRowCellValue("qd002", SelectedDataRow["itemNo"]); |
| | | gvMx1.SetFocusedRowCellValue("qd003", SelectedDataRow["itemName"]); |
| | | gvMx1.SetFocusedRowCellValue("qd004", SelectedDataRow["itemModel"]); |
| | | gvMx1.SetFocusedRowCellValue("itemNo", SelectedDataRow["itemNo"]); |
| | | gvMx1.SetFocusedRowCellValue("itemName", SelectedDataRow["itemName"]); |
| | | gvMx1.SetFocusedRowCellValue("itemModel", SelectedDataRow["itemModel"]); |
| | | } |
| | | |
| | | private void repositoryItemButtonEdit1_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | } |