| | |
| | | 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; |
| | |
| | | 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) |
| | | { |
| | | _filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns); |
| | |
| | | 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)); |
| | |
| | | { |
| | | 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) |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | } |