/// <summary> /// 调拨查询管理 /// </summary> /// <param name="state">调拨状态</param> /// <param name="isAllocateInbound">true:调拨入库 false:调拨</param> public CurrentShopAllocateManageCtrl(AllocateOrderState state = AllocateOrderState.All) { InitializeComponent(); dataGridViewPagingSumCtrl2 = new DataGridViewPagingSumCtrl(this.dataGridView2, new string[] { xSDataGridViewTextBoxColumn.DataPropertyName, sDataGridViewTextBoxColumn.DataPropertyName, mDataGridViewTextBoxColumn.DataPropertyName, lDataGridViewTextBoxColumn.DataPropertyName, xLDataGridViewTextBoxColumn.DataPropertyName, xL2DataGridViewTextBoxColumn.DataPropertyName, xL3DataGridViewTextBoxColumn.DataPropertyName, xL4DataGridViewTextBoxColumn.DataPropertyName, xL5DataGridViewTextBoxColumn.DataPropertyName, xL6DataGridViewTextBoxColumn.DataPropertyName, fDataGridViewTextBoxColumn.DataPropertyName }); dataGridViewPagingSumCtrl2.SpecAutoSizeModeColumns(new DataGridViewColumn[] { costumeIDDataGridViewTextBoxColumn }); dataGridViewPagingSumCtrl2.Initialize(); this.dataGridViewPagingSumCtrl = new DataGridViewPagingSumCtrl(this.dataGridView1, dataGridViewPagingSumCtrl_CurrentPageIndexChanged, BaseButton_Search_Click, new string[] { totalCountDataGridViewTextBoxColumn.DataPropertyName, totalPriceDataGridViewTextBoxColumn.DataPropertyName }); dataGridViewPagingSumCtrl.SpecAutoSizeModeColumns(new DataGridViewColumn[] { remarksDataGridViewTextBoxColumn }); dataGridViewPagingSumCtrl.Initialize(); dataGridViewPagingSumCtrl.ColumnSorting += dataGridViewPagingSumCtrl_ColumnSorting; this.createTimeDataGridViewTextBoxColumn.DefaultCellStyle.Format = DateTimeUtil.DEFAULT_DATETIME_FORMAT; this.dataGridView1.AutoGenerateColumns = false; this.state = state; }
public void WorkSearch(AllocateOrderState state) { this.skinComboBox_State.SelectedValue = state; this.skinCmbReceiptState.SelectedValue = ReceiptState.WaitReceipt; this.ShopCmbGet.SelectedValue = CommonGlobalCache.CurrentShopID; DateTimeUtil.DateTimePicker_All(dateTimePicker_Start, dateTimePicker_End); this.BaseButton_Search_Click(null, null); }
private void dataGridView1_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e) { if (e.ColumnIndex < 0 || e.RowIndex < 0) { return; } if (e.Value == null) { return; } DataGridViewRow row = dataGridView1.Rows[e.RowIndex]; AllocateOrder order = (AllocateOrder)row.DataBoundItem; AllocateOrderState state = (AllocateOrderState)order.State; if (operationColumn.Index == e.ColumnIndex) { if ((state == AllocateOrderState.Delivery && order.DestShopID != CommonGlobalCache.CurrentShopID && CommonGlobalCache.CurrentShopID != CommonGlobalCache.GeneralStoreShopID ) || state == AllocateOrderState.OverrideOrder || state == AllocateOrderState.HangUp || state == AllocateOrderState.Receipt) { e.Value = null; } } else if (ColumnCancel.Index == e.ColumnIndex) { if (state != AllocateOrderState.Delivery && state != AllocateOrderState.Receipt) { e.Value = null; } } else if (ColumnRedo.Index == e.ColumnIndex) { if (state != AllocateOrderState.OverrideOrder) { e.Value = null; } } else if (ColumnPick.Index == e.ColumnIndex) { if (state != AllocateOrderState.HangUp) { e.Value = null; } } else if (FinishedTime.Index == e.ColumnIndex) { if (state != AllocateOrderState.Receipt) { e.Value = null; } } }
/// <summary> /// 根据调拨状态查询 /// </summary> /// <param name="state">调拨状态</param> public void AllocateOrderStateSearch(AllocateOrderState state) { // this.skinComboBox_State.SelectedValue = state; if (state == AllocateOrderState.Delivery || state == AllocateOrderState.Receipt) { this.skinComboBox_State.SelectedValue = AllocateOrderState.Normal; } this.BaseButton_Search_Click(null, null); }
/// <summary> /// 根据调拨状态查询 /// </summary> /// <param name="state">调拨状态</param> public void AllocateOrderStateSearch() { this.state = AllocateOrderState.Normal; this.skinComboBox_State.SelectedValue = state; this.skinComboBox_AllocateType.SelectedIndex = 0; pagePara = new AllocateOrderPagePara() { AllocateOrderState = AllocateOrderState.Delivery, IsOpenDate = false, SourceShopID = CommonGlobalCache.CurrentShopID, DestShopID = ValidateUtil.CheckEmptyValue(this.skinComboBox_DestShop.SelectedValue), PageIndex = 0, PageSize = this.dataGridViewPagingSumCtrl.PageSize }; Search(); pagePara.IsOpenDate = true; }
private void BaseButton_Search_Click(object sender, EventArgs e) { try { if (CommonGlobalUtil.EngineUnconnectioned(this)) { return; } string orderID = string.IsNullOrEmpty(this.skinTextBox_OrderID.SkinTxt.Text) ? null : this.skinTextBox_OrderID.SkinTxt.Text; string costumeID = string.IsNullOrEmpty(this.costumeTextBox1.SkinTxt.Text) ? null : this.costumeTextBox1.SkinTxt.Text; string shopid = ValidateUtil.CheckEmptyValue(this.shopComboBox1.SelectedValue); AllocateOrderState state = (AllocateOrderState)this.skinComboBox_State.SelectedValue; AllocateOrderType type = (AllocateOrderType)this.skinComboType.SelectedValue; string descShopId = ValidateUtil.CheckEmptyValue(this.ShopCmbGet.SelectedValue); string SourceShopId = ValidateUtil.CheckEmptyValue(this.shopCmbSend.SelectedValue); // AllocateOrderState boundState=(AllocateOrderState)skinComboBoxBoundState.SelectedValue; /* if (boundState != AllocateOrderState.All) * { * state = boundState; * }*/ /* pagePara = new AllocateOrderPagePara() * { * CostumeID = costumeID, * AllocateOrderID = orderID, * AllocateOrderState = state, * IsOpenDate = this.isOpenDate, * // SourceShopID = ValidateUtil.CheckEmptyValue(this.skinComboBox_SourceShop.SelectedValue), * // DestShopID = ValidateUtil.CheckEmptyValue(this.skinComboBox_DestShop.SelectedValue), * * StartDate = new CJBasic.Date(this.dateTimePicker_Start.Value), * EndDate = new CJBasic.Date(this.dateTimePicker_End.Value), * PageIndex = 0, * PageSize = this.dataGridViewPagingSumCtrl.PageSize * };*/ /* if (pagePara.DestShopID == pagePara.SourceShopID) * { * ShowError("发货方与收货方不能相同!"); * return; * }*/ // AllocateOrderPage listPage = null; // listPage = CommonGlobalCache.ServerProxy.GetAllocateOrderPage(this.pagePara); pagePara = new GetAllocateOrdersPara() { AllocateOrderID = orderID, AllocateOrderState = state, CostumeID = costumeID, EndDate = new CJBasic.Date(this.dateTimePicker_End.Value), StartDate = new CJBasic.Date(this.dateTimePicker_Start.Value), ShopID = shopid, Type = type, PageIndex = 0, PageSize = this.dataGridViewPagingSumCtrl.PageSize, ReceiptState = (ReceiptState)skinCmbReceiptState.SelectedValue, LockShop = isCheckOnlyCurShop, DestShopID = descShopId, SourceShopID = SourceShopId, Remarks = ValidateUtil.CheckEmptyValue(this.txtRemark.SkinTxt.Text), }; InteractResult <AllocateOrderPage> allOrderPage = CommonGlobalCache.ServerProxy.GetAllocateOrders(pagePara); dataGridViewPagingSumCtrl.OrderPara = pagePara; this.dataGridViewPagingSumCtrl.Initialize(allOrderPage.Data); this.BindingAllocateOrderSource(allOrderPage.Data); } catch (Exception ee) { ShowError(ee); } finally { UnLockPage(); } }