/// <summary> /// 将CostumeStore转化为InboundDetail /// </summary> /// <param name="store"></param> /// <returns></returns> private PfOrderDetail CostumeStoreConvertToInboundDetail(CostumeStore store) { if (store == null) { return(null); } return(new PfOrderDetail() { //ReplenishOrderID = replenishOrderID, CostumeID = store.CostumeID, CostumeName = store.CostumeName, BrandName = store.BrandName, ColorName = store.ColorName, CustomerID = ValidateUtil.CheckEmptyValue(this.skinComboBox_PfCustomer.SelectedValue), // Discount = store.Discount, BrandID = store.BrandID, XS = store.XS, S = store.S, M = store.M, L = store.L, F = store.F, XL = store.XL, XL2 = store.XL2, XL3 = store.XL3, XL4 = store.XL4, XL5 = store.XL5, XL6 = store.XL6, Price = store.Price, PfPrice = store.CostPrice, Comment = store.Remarks, }); }
private void skinComboBoxShopID_SelectedIndexChanged(object sender, EventArgs e) { string supplierId = ValidateUtil.CheckEmptyValue(skinComboBox_PfCustomer.SelectedValue); if (!String.IsNullOrEmpty(selectedSupplierID) && selectedSupplierID != supplierId && curInboundDetailList != null && curInboundDetailList.Count > 0) { List <PfOrderDetail> pfDetails = new List <PfOrderDetail>(); foreach (var item in curInboundDetailList) { item.CustomerID = supplierId; item.CustomerName = pfCustomer.Name; Costume citem = GlobalCache.GetCostume(item.CostumeID); item.PfPrice = citem.Price == 0 ? 0 : Math.Round(citem.Price * pfCustomer.PfDiscount * (decimal)0.01, 2, MidpointRounding.AwayFromZero); pfDetails.Add(item); } this.curInboundDetailList.Clear(); this.curInboundDetailList = pfDetails; dataGridViewPagingSumCtrl2.BindingDataSource <PfOrderDetail>(DataGridViewUtil.ListToBindingList(this.curInboundDetailList)); // dataGridViewPagingSumCtrl3.BindingDataSource<PfOrderDetail>(DataGridViewUtil.ListToBindingList(this.curInboundDetailList)); dataGridViewPagingSumCtrl2.ScrollToEnd(); /* GlobalMessageBox.Show("请选择相同的客户!"); * skinComboBox_PfCustomer.SelectedValue = selectedSupplierID; * return;*/ } selectedSupplierID = supplierId; // this.costumeFromSupplierTextBox1.SupplierID = supplierId; }
private void BaseButton_search_Click(object sender, EventArgs e) { try { if (CommonGlobalUtil.EngineUnconnectioned(this)) { return; } para = new SignRecordPagePara() { EndDate = new Date(this.dateTimePicker_End.Value), StartDate = new Date(this.dateTimePicker_Start.Value), GuideID = ValidateUtil.CheckEmptyValue(this.guideComboBox1.SelectedValue), ShopID = ValidateUtil.CheckEmptyValue(this.skinComboBoxShopID.SelectedValue), PageIndex = 0, PageSize = this.dataGridViewPagingSumCtrl.PageSize, SignType = (SignType)this.skinComboBox_signType.SelectedValue, }; dataGridViewPagingSumCtrl.OrderPara = para; SignRecordPage listPage = CommonGlobalCache.ServerProxy.GetSignRecordPage(para); this.dataGridViewPagingSumCtrl.Initialize(listPage); BindingSource(listPage); } catch (Exception ex) { ShowError(ex); } finally { UnLockPage(); } }
private void BaseButtonConfirm_Click(object sender, EventArgs e) { try { if (skinRadioButtonOnline.Checked) { if (String.IsNullOrEmpty(ValidateUtil.CheckEmptyValue(this.skinTextBoxLogisticCompany.SelectedValue))) { // GlobalMessageBox.Show("物流公司不能为空"); skinTextBoxLogisticCompany.Focus(); return; } if (String.IsNullOrEmpty(this.skinTextBoxLogisticId.Text)) { // GlobalMessageBox.Show("单号不能为空"); skinTextBoxLogisticId.Focus(); return; } if (GlobalMessageBox.Show("是否确认操作?", "确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { if (!GlobalUtil.EngineUnconnectioned(this)) { CJBasic.CbGeneric cb = new CJBasic.CbGeneric(this.GetInfo); cb.BeginInvoke(null, null); } } } } catch (Exception ex) { GlobalUtil.ShowError(ex); } }
private void Initialize() { SetSignType(); this.skinComboBoxShopID.Initialize(); DateTimeUtil.DateTimePicker_SetDateTimePicker(dateTimePicker_Start, dateTimePicker_End); this.guideComboBox1.Initialize(Common.GuideComboBoxInitializeType.All, ValidateUtil.CheckEmptyValue(this.skinComboBoxShopID.SelectedValue)); this.skinSplitContainer1.Panel2Collapsed = true; }
private void BaseButton_OK_Click(object sender, EventArgs e) { ConfirmClick?.Invoke(ValidateUtil.CheckEmptyValue(guideComboBox1.SelectedValue)); //if (ConfirmClickSuccess) //{ // this.DialogResult = DialogResult.OK; //}d }
private void GetInfo() { try { EmOutboundPara para = new EmOutboundPara() { ShopID = ValidateUtil.CheckEmptyValue(skinComboBoxShopID.SelectedValue), EmRetailOrderID = Order.ID, ExpressCompany = skinRadioButtonOnline.Checked ? ValidateUtil.CheckEmptyValue(skinTextBoxLogisticCompany.SelectedValue) : null, ExpressOrderID = skinRadioButtonOnline.Checked ? skinTextBoxLogisticId.Text:null, }; if (skinRadioButtonOnline.Checked) { bool rightExpress = KuaiDi100Helper.CheckKuaiDi(GlobalUtil.GetExpressCode(this, para.ExpressCompany), para.ExpressOrderID); if (!rightExpress) { ShowMessage("单号不存在或者已过期!"); return; } } InteractResult result = GlobalCache.EMallServerProxy.EmOutbound(para); switch (result.ExeResult) { case ExeResult.Success: ShowMessage("发货成功!"); if (skinRadioButtonOnline.Checked) { EmExpressCompany company = skinTextBoxLogisticCompany.SelectedItem as EmExpressCompany; config.EmExpressCompany = company; config.Save(CONFIG_PATH); } CloseFormAndRefresh(para); SetDialogResult(DialogResult.OK); break; case ExeResult.Error: ShowMessage(result.Msg); break; default: break; } } catch (KuaiDiException ex) { ShowErrorMessage(ex.Message); } catch (Exception ex) { ShowError(ex); } finally { UnLockPage(); } }
private void BaseButton_Search_Click(object sender, EventArgs e) { try { if (CommonGlobalUtil.EngineUnconnectioned(this)) { return; } if (isMonth) { startDate = TimeHelper.GetReportMonth(this.dateTimePicker_Start.Value); endDate = TimeHelper.GetReportMonth(this.dateTimePicker_End.Value); } else { startDate = TimeHelper.GetReportDay(this.dateTimePicker_Start.Value); endDate = TimeHelper.GetReportDay(this.dateTimePicker_End.Value); } this.pagePara = new GuideAchievementSummarysPara() { IsMonth = isMonth, StartDate = startDate, EndDate = endDate, //PageIndex = 0, //PageSize = this.pageSize, IsGetGeneralStore = CommonGlobalCache.IsGeneralStoreRetail == "1", ShopID = shopID, GuideID = ValidateUtil.CheckEmptyValue(guideComboBox1.SelectedValue), IsOnlyShowNoZero = this.skinCheckBox_IsOnlyShowNoZero.Checked }; // List<GuideAchievementSummary> GuideAchievementSummarys listPage = CommonGlobalCache.ServerProxy.GetGuideAchievementSummarys(this.pagePara); SetDisplay(); if (listPage != null) { foreach (GuideAchievementSummary item in listPage.List) { item.GuideName = CommonGlobalCache.GetUserName(item.GuideID); item.ShopName = CommonGlobalCache.GetShopName(item.ShopID); } } dataGridViewPagingSumCtrl.BindingDataSource <GuideAchievementSummary>(DataGridViewUtil.ToDataTable <GuideAchievementSummary>(listPage?.List), null, ListSortDirection.Descending, listPage?.Sum); skinSplitContainer1.Panel2Collapsed = true; } catch (Exception ee) { ShowError(ee); } finally { UnLockPage(); } }
private void BaseButtonSaveAccount_Click(object sender, EventArgs e) { try { String supllier = ValidateUtil.CheckEmptyValue(this.skinComboBox_SupplierID.SelectedValue); if (String.IsNullOrEmpty(supllier)) { skinComboBox_SupplierID.Focus(); GlobalMessageBox.Show("请先选择供应商!"); return; } if (String.IsNullOrEmpty(numericTextBox1.Text)) { numericTextBox1.Focus(); return; } //if (GlobalMessageBox.Show("是否确认操作?", "确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) != DialogResult.Yes) //{ // return; //} if (GlobalUtil.EngineUnconnectioned(this)) { return; } decimal money = this.numericTextBox1.Value; Supplier supplier = (Supplier)skinComboBox_SupplierID.SelectedItem; supplier.PaymentBalance = money; //InteractResult result = GlobalCache.ServerProxy.UpdateSupplier(supplier); InteractResult result = GlobalCache.ServerProxy.UpdateSupplierPaymentBalance(supplier.ID, supplier.PaymentBalance); switch (result.ExeResult) { case ExeResult.Success: // GlobalMessageBox.Show("登记完成!"); this.ReLoad(); break; case ExeResult.Error: GlobalMessageBox.Show(result.Msg); break; default: break; } } catch (Exception ee) { GlobalUtil.ShowError(ee); } finally { numericTextBox1.SkinTxt.Text = string.Empty; // this.skinTextBoxRemark.SkinTxt.Text = string.Empty; GlobalUtil.UnLockPage(this); } }
private void BaseButton_Search_Click(object sender, EventArgs e) { try { if (CommonGlobalUtil.EngineUnconnectioned(this)) { return; } int range = 0; try { range = Convert.ToInt32(this.skinComboBoxPrice.Text); if (range <= 0) { GlobalMessageBox.Show("价格区间必须大于0!"); return; } } catch (Exception ex) { GlobalMessageBox.Show("请输入正整数!"); skinComboBoxPrice.Focus(); return; } this.pagePara = new GetPriceRangeReportsPara() { StartDate = new CJBasic.Date(this.dateTimePicker_Start.Value), EndDate = new CJBasic.Date(this.dateTimePicker_End.Value), Range = range, IsGetGeneralStore = CommonGlobalCache.IsGeneralStoreRetail == "1", ShopId = ValidateUtil.CheckEmptyValue(skinComboBoxShop.SelectedValue) }; InteractResult <List <PriceRangeReport> > listPage = new InteractResult <List <PriceRangeReport> >(); if (listPage.ExeResult == ExeResult.Success) { listPage = GlobalCache.ServerProxy.GetPriceRangeReports(this.pagePara); } else { ShowError(listPage.Msg); } SetDisplay(); this.BindingCostumeStoreDataSource(listPage.Data); } catch (Exception ee) { ShowError(ee); } finally { UnLockPage(); } }
private void BaseButton_Search_Click(object sender, EventArgs e) { this.pagePara = new SupplierAccountContrastPara() { SupplierID = ValidateUtil.CheckEmptyValue(this.skinComboBoxSupplier.SelectedValue), StartDate = new CJBasic.Date(this.dateTimePicker_Start.Value), EndDate = new CJBasic.Date(this.dateTimePicker_End.Value), }; Search(pagePara); }
private void BaseButton_Search_Click(object sender, EventArgs e) { CommonGlobalUtil.Debug("开始查询"); try { if (CommonGlobalUtil.EngineUnconnectioned(this)) { return; } string curPfCustomerID = ""; if (skinComboBox_PfCustomer.SelectedValue != null) { curPfCustomerID = ValidateUtil.CheckEmptyValue(skinComboBox_PfCustomer.SelectedValue); } else { if (skinComboBox_PfCustomer.Text != "" && skinComboBox_PfCustomer.Text != "所有") { GlobalMessageBox.Show("请输入正确的客户信息后再进行查询!"); this.skinComboBox_PfCustomer.Focus(); return; } } this.pagePara = new GetPfCustomerInvoicingPara() { PfCustomerID = curPfCustomerID, StartDate = new CJBasic.Date(this.dateTimePicker_Start.Value), EndDate = new CJBasic.Date(this.dateTimePicker_End.Value), CostumeID = this.skinTextBox_costumeID.Text, }; //找到对应的大类 if (!String.IsNullOrEmpty(this.skinTextBox_costumeID.Text) && skinComboBox_PfCustomer.SelectedValue == null) { InteractResult <List <PfCustomerInvoicing> > listPage = GlobalCache.ServerProxy.GetPfInvoicingOnlyCostumeID(this.pagePara); this.BindingCostumeStoreDataSource(listPage.Data); } else { InteractResult <List <PfCustomerInvoicing> > listPage = GlobalCache.ServerProxy.GetPfCustomerInvoicing(this.pagePara); this.BindingCostumeStoreDataSource(listPage.Data); } } catch (Exception ee) { ShowError(ee); } finally { UnLockPage(); } CommonGlobalUtil.Debug("结束查询"); }
private void BaseButton_OK_Click(object sender, EventArgs e) { this.skinLabel1.Visible = true; this.UseWaitCursor = true; this.skinPanel2.Enabled = false; ConfirmClick?.Invoke(dateTimePicker_Start.Value, ValidateUtil.CheckEmptyValue(skinComboBoxShopID.SelectedValue), this); //if (ConfirmClickSuccess) //{ // this.DialogResult = DialogResult.OK; //} }
public RefundDirectCtrl(RetailOrder order) { InitializeComponent(); Init(); this.order = order; if (!HasPermission(RolePermissionMenuEnum.销售退货单查询, RolePermissionEnum.重做_单据时间)) { dateTimePicker_Start.Enabled = false; } List <RetailDetail> details = CommonGlobalCache.ServerProxy.GetRetailDetailList(order.ID); if (!String.IsNullOrEmpty(order.MemeberID)) { memberIDTextBox2.Text = order.MemeberID; memberIDTextBox2.Search(); } //guideComboBox2.SelectedValue = order.GuideID; guideComboBox1.SelectedValue = order.OperateGuideID; dateTimePicker_Start.Value = order.CreateTime; string selectShopid = ValidateUtil.CheckEmptyValue(order.ShopID); List <Guide> guideList = CommonGlobalCache.GuideList.FindAll(t => t.State == 0 && t.ShopID == selectShopid); if (details != null) { foreach (var item in details) { this.GuideName.DataSource = guideList; this.GuideName.DisplayMember = "Name"; this.GuideName.ValueMember = "ID"; item.CostumeName = CommonGlobalCache.GetCostumeName(item.CostumeID); item.SizeDisplayName = CommonGlobalUtil.GetCostumeSizeName(item.CostumeID, item.SizeName); item.BuyCount = -item.BuyCount; item.SumMoney = -item.SumMoney; item.IsRefund = true; item.RefundCount = item.BuyCount; item.SumMoneyActual = -item.SumMoneyActual; item.IsUseTickets = false; item.Discount = 100; item.DiscountOrigin = 100; item.AllowReviseDiscount = true; item.CostPrice = -item.CostPrice; item.SumCost = -item.SumCost; item.GuideID = item.GuideID; } } retailDetailList = details; dataGridViewPagingSumCtrl.BindingDataSource(DataGridViewUtil.ListToBindingList(retailDetailList)); }
private void BaseButton_Search_Click(object sender, EventArgs e) { this.pagePara = new PurchasePayManagePara() { SupplierID = ValidateUtil.CheckEmptyValue(this.skinComboBoxSupplier.SelectedValue), StartDate = new CJBasic.Date(this.dateTimePicker_Start.Value), EndDate = new CJBasic.Date(this.dateTimePicker_End.Value), PageIndex = 0, PageSize = this.dataGridViewPagingSumCtrl.PageSize, PayType = (SupplierAccountRecordPayType)this.skinComboBox1.SelectedValue, }; Search(pagePara); }
private void BaseButtonQuery_Click(object sender, EventArgs e) { try { if (GlobalUtil.EngineUnconnectioned(this)) { return; } GetSalesPromotionListPara para = new GetSalesPromotionListPara(); para.PromotionType = (int)this.skinComboBoxPromotionType.SelectedValue; para.ShopID = ValidateUtil.CheckEmptyValue(this.skinComboBoxShopID.SelectedValue); this.dataGridView1.DataSource = null; List <SalesPromotion> list = GlobalCache.ServerProxy.GetSalesPromotionList(para); if (list != null) { list = list.FindAll(t => t.IsValid); } foreach (var item in list) { String shopNames = ""; if (!String.IsNullOrEmpty(item.ShopIDStr)) { String[] ids = item.ShopIDStr.Split(','); foreach (var id in ids) { Shop shop = GlobalCache.ShopList.Find(t => t.ID == id); if (shop != null) { shopNames += shop.Name + ","; } } if (!String.IsNullOrEmpty(shopNames)) { shopNames = shopNames.Remove(shopNames.LastIndexOf(",")); } item.ShopNames = shopNames; } } this.dataGridView1.DataSource = DataGridViewUtil.ListToBindingList <SalesPromotion>(list); } catch (Exception ex) { GlobalUtil.ShowError(ex); } finally { GlobalUtil.UnLockPage(this); } }
private void BaseButton_Search_Click(object sender, EventArgs e) { this.pagePara = new GetCheckStoreSummaryPagePara() { StartDate = new CJBasic.Date(this.dateTimePicker_Start.Value), EndDate = new CJBasic.Date(this.dateTimePicker_End.Value), //CheckStoreTaskID = this.textBoxTaskId.Text, PageIndex = 0, PageSize = this.dataGridViewPagingSumCtrl.PageSize, ShopID = ValidateUtil.CheckEmptyValue(this.skinComboBoxShop.SelectedValue), State = (CheckStoreState)skinComboBox_State.SelectedValue }; Search(); }
private BoundDetail CostumeStoreConvertToOutboundDetail(CostumeStore store, string replenishOrderID) { if (store == null) { return(null); } Costume costume = GlobalCache.GetCostume(store.CostumeID); BoundDetail boundDetail = new BoundDetail(); ReflectionHelper.CopyProperty(costume, boundDetail); ReflectionHelper.CopyProperty(store, boundDetail); boundDetail.SupplierID = ValidateUtil.CheckEmptyValue(this.skinComboBoxSupplierID.SelectedValue); return(boundDetail); }
private void BaseButtonQuery_Click(object sender, EventArgs e) { if (!HasPermission(RolePermissionEnum.查看)) { return; } try { if (GlobalUtil.EngineUnconnectioned(this)) { return; } String shopID = ValidateUtil.CheckEmptyValue(this.skinComboBoxShopID.SelectedValue); GetGuidesPara para = new GetGuidesPara() { IdOrName = skinTextBoxName.SkinTxt.Text, ShopID = shopID, State = (GuideState)skinComboBoxState.SelectedValue }; InteractResult <List <Guide> > result = GlobalCache.ServerProxy.GetGuides(para); //List<Guide> list = GlobalCache.GuideList.FindAll(t => (t.Name.Contains(skinTextBoxName.SkinTxt.Text) //|| t.ID.Contains(skinTextBoxName.SkinTxt.Text)) && (t.ShopID == shopID || shopID == null) //); //if ((int)skinComboBoxState.SelectedValue != -1) //{ // list = list.FindAll(t => t.State == (int)skinComboBoxState.SelectedValue); //} if (result.Data != null) { //foreach (Guide guide in result.Data) //{ // guide.ShopName = GlobalCache.GetShopName(guide.ShopID); //} //this.dataGridView.DataSource = list; dataGridViewPagingSumCtrl.BindingDataSource(DataGridViewUtil.ListToBindingList <Guide>(result.Data)); } } catch (Exception ex) { GlobalUtil.ShowError(ex); } finally { GlobalUtil.UnLockPage(this); } }
private void CheckStore(int i) { if (i == 0) { String color = ValidateUtil.CheckEmptyValue(skinComboBox_Color.SelectedValue); String size = ValidateUtil.CheckEmptyValue(skinComboBox_Size.SelectedValue); this.skinLabelStore = GetStore(color, size); } else { String color = ValidateUtil.CheckEmptyValue(skinComboBox_Color1.SelectedValue); String size = ValidateUtil.CheckEmptyValue(skinComboBox_Size1.SelectedValue); this.skinLabelStore1 = GetStore(color, size); } }
private void shopComboBox1_SelectedIndexChanged(object sender, EventArgs e) { shop = shopComboBox1.SelectedItem as Shop; /* if (BaseUserControl.IsPos) * { * guideComboBox1.Initialize(GuideComboBoxInitializeType.Null, shop.ID); * }*/ /*skinComboBoxShopID.Initialize(true); * shopComboBox1.Initialize(true);*/ skinComboBoxShopID.Initialize(true, false, false, false, ValidateUtil.CheckEmptyValue(shopComboBox1.SelectedValue)); this.CostumeCurrentShopTextBox1.ShopID = ValidateUtil.CheckEmptyValue(shopComboBox1.SelectedValue); //guideComboBox1.Initialize(, ,); }
private void BuildPara() { string costumeID = string.IsNullOrEmpty(this.CostumeCurrentShopTextBox1.SkinTxt.Text.Trim()) ? null : this.CostumeCurrentShopTextBox1.SkinTxt.Text.Trim(); bool isOnlyShowHaveNegative = this.skinckbNoZeroStore.Checked; string curBrandStr = ValidateUtil.CheckEmptyValue(this.skinComboBox_Brand.SelectedValue); int curBrandID = 0; if (curBrandStr == null) { curBrandID = 0; } curBrandID = Convert.ToInt32(curBrandStr); string curPfCustomerID = ""; if (skinComboBoxSupplier.SelectedValue != null) { curPfCustomerID = ValidateUtil.CheckEmptyValue(skinComboBoxSupplier.SelectedValue); } else { if (skinComboBoxSupplier.Text != "" && skinComboBoxSupplier.Text != "所有") { GlobalMessageBox.Show("请输入正确的客户信息后再进行查询!"); this.skinComboBoxSupplier.Focus(); return; } } CostumeColor color = this.skinComboBox_Color.SelectedItem as CostumeColor; int year = (int)(this.skinComboBox_Year.SelectedValue); this.pagePara = new GetPfCustomerStorePagePara() { CostumeID = costumeID, BrandID = curBrandID, PfCustomerID = curPfCustomerID, PageIndex = 0, PageSize = int.MaxValue,// this.dataGridViewPagingSumCtrl.PageSize, ClassID = skinComboBoxBigClass.SelectedValue.ClassID, ColorName = color?.Name == CommonGlobalUtil.COMBOBOX_ALL ? null : color?.Name, Season = ValidateUtil.CheckEmptyValue(this.skinComboBox_Season.SelectedValue), SupplierID = ValidateUtil.CheckEmptyValue(supllierComboBox1.SelectedValue), Year = year, IsShowColor = skinCheckBoxShowColor.Checked, IsOnlyShowNotZero = isOnlyShowHaveNegative, }; }
//点击查询按钮 private void BaseButton_Search_Click(object sender, EventArgs e) { string orderID = this.skinTextBox_OrderID.SkinTxt.Text.Trim(); orderID = string.IsNullOrEmpty(orderID) ? null : orderID; string costumeID = this.CostumeCurrentShopTextBox1.SkinTxt.Text; costumeID = string.IsNullOrEmpty(costumeID) ? null : costumeID; bool isOpenDate = true; Date startDate = new Date(this.dateTimePicker_Start.Value); Date endDate = new Date(this.dateTimePicker_End.Value); string curBrandStr = ValidateUtil.CheckEmptyValue(this.skinComboBox_Brand.SelectedValue); int curBrand = 0; if (curBrandStr == null) { curBrand = 0; } else { curBrand = Convert.ToInt32(curBrandStr); } this.pagePara = new RetailListPagePara() { RetailOrderState = (RetailOrderState)this.skinComboBoxState.SelectedValue, RetailOrderID = orderID, CostumeID = costumeID, StartDate = startDate, EndDate = endDate, ClassID = skinComboBoxBigClass.SelectedValue.ClassID, //SubSmallClass = skinComboBoxBigClass.SelectedValue?.SubSmallClass, BrandID = curBrand, IsOpenDate = isOpenDate, PageIndex = 0, PageSize = this.retailOrderListCtrl2.dataGridViewPagingSumCtrl.PageSize, RetailOrderType = (RetailOrderType)this.skinComboBox_type.SelectedValue, IsGetGeneralStore = CommonGlobalCache.IsGeneralStoreRetail == "1", ShopID = shopID, GuideID = ValidateUtil.CheckEmptyValue(this.guideComboBox1.SelectedValue), RetailPayType = (RetailPayType)this.brandComboBoxPayType.SelectedValue, IsOnlyNotPay = skinCheckBoxNew.Checked, Remarks = ValidateUtil.CheckEmptyValue(this.txtRemark.SkinTxt.Text), }; Search(); }
//点击搜索按钮 private void BaseButton_Search_Click(object sender, EventArgs e) { this.pagePara = new MemberListPagePara() { Ascend = false, ShopID = shopId, ColumnOrderby = Member._CreatedTime, TimeRange = (TimeRange)skinComboBoxBigClass.SelectedValue, PageIndex = 0, PageSize = this.dataGridViewPagingSumCtrl.PageSize, PhoneNumberOrName = this.skinTextBox_ID.SkinTxt.Text.Trim(), GuideID = ValidateUtil.CheckEmptyValue(guideComboBox1.SelectedValue), NoRetailDay = (int)unconsumedComboBox.SelectedValue }; Search(); }
/// <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 Costume GetEntity() { Costume item = new Costume(); item.ID = this.skinTextBox_ID.Text.Trim(); item.Name = this.skinTextBox_Name.Text.Trim(); item.Price = this.numericUpDown_Price.Value; //20180602增加默认线上价格 item.EmOnlinePrice = item.Price; item.CostPrice = this.numericUpDownCostPrice.Value; item.SalePrice = this.numericTextBoxSalePrice.Value; item.SupplierID = ValidateUtil.CheckEmptyValue(this.skinComboBox_SupplierID.SelectedValue); String brandId = ValidateUtil.CheckEmptyValue(this.skinComboBox_Brand.SelectedValue); if (brandId != null) { item.BrandID = int.Parse(brandId); } if (this.skinComboBox_Year.SelectedValue != null) { item.Year = (int)this.skinComboBox_Year.SelectedValue; } //else //{ // this.skinComboBox_Year.SelectedValue = DateTime.Now.Year; // item.Year = (int)this.skinComboBox_Year.SelectedValue; //} item.Season = ValidateUtil.CheckEmptyValue(this.skinComboBox_Season.skinComboBox.SelectedValue); item.ClassID = this.skinComboBoxBigClass.SelectedValue.ClassID; //item.BigClass = this.skinComboBoxBigClass.SelectedValue?.BigClass; //item.SmallClass = this.skinComboBoxBigClass.SelectedValue?.SmallClass; //item.SubSmallClass = this.skinComboBoxBigClass.SelectedValue?.SubSmallClass; // item.Photo = null;//图片不缓存本地 //从列表获取颜色属性并拼起来 // item.Colors = this.textBoxColor.Text; item.Remarks = this.skinTextBox_Remarks.Text.Trim(); item.IsValid = true; if (selectSizeGroup != null && selectSizeGroup.SizeGroup != null) { item.SizeGroupName = selectSizeGroup.SizeGroup.SizeGroupName; item.SizeNames = selectSizeGroup.SelectedSizeNames; } return(item); }
private void GetInfo() { try { String expressCompany = ValidateUtil.CheckEmptyValue(skinTextBoxLogisticCompany.SelectedValue); String expressOrderID = skinTextBoxLogisticId.Text; bool rightExpress = KuaiDi100Helper.CheckKuaiDi(GlobalUtil.GetExpressCode(this, expressCompany), expressOrderID); if (!rightExpress) { ShowMessage("单号不存在或者已过期!"); return; } TabPage page = tabControl1.SelectedTab; KeyValuePair <PfOrder, List <PfCustomerDetail> > details = (KeyValuePair <PfOrder, List <PfCustomerDetail> >)page.Tag; InteractResult result = GlobalCache.EMallServerProxy.SetPfOrderExpressInfo(details.Key.ID, expressCompany, expressOrderID); switch (result.ExeResult) { case ExeResult.Success: ShowMessage("保存成功!"); break; case ExeResult.Error: ShowMessage(result.Msg); break; default: break; } } catch (KuaiDiException ex) { ShowErrorMessage(ex.Message); } catch (Exception ex) { ShowError(ex); } finally { UnLockPage(); } }
private void BaseButton_Search_Click(object sender, EventArgs e) { try { if (GlobalUtil.EngineUnconnectioned(this)) { return; } if ((pfCustomer.ID == null || pfCustomer.ID == "" || pfCustomer == null) && skinComboBox_PfCustomer.Text != "所有") { ShowMessage("客户不存在,请重新选择!"); skinComboBox_PfCustomer.Focus(); return; } string orderID = string.IsNullOrEmpty(this.skinTextBox_OrderID.SkinTxt.Text) ? null : this.skinTextBox_OrderID.SkinTxt.Text; this.pagePara = new GetPfOrderPagePara() { PfOrderID = orderID, StartDate = new CJBasic.Date(this.dateTimePicker_Start.Value), EndDate = new CJBasic.Date(this.dateTimePicker_End.Value), PageIndex = 0, PageSize = this.dataGridViewPagingSumCtrl.PageSize, PfCustomerID = pfCustomer.ID, // SupplierID = ValidateUtil.CheckEmptyValue(this.skinComboBox_PfCustomer.SelectedValue), CostumeID = ValidateUtil.CheckEmptyValue(skinTextBox_costumeID.SkinTxt.Text), PfOrderState = (PfOrderState)pfType.SelectedValue, PfOrderStateEnum = (PfOrderStateEnum)skinComboBox_State.SelectedValue }; PfOrderPage listPage = GlobalCache.ServerProxy.GetPfOrderPage(this.pagePara); dataGridViewPagingSumCtrl.OrderPara = pagePara; dataGridViewPagingSumCtrl.Initialize(listPage); BindingReturnOrderSource(listPage); } catch (Exception ee) { GlobalUtil.ShowError(ee); } finally { GlobalUtil.UnLockPage(this); } }
private Costume GetEntity() { Costume item = new Costume(); item.ID = this.skinTextBox_ID.Text.Trim(); item.Name = this.skinTextBox_Name.Text.Trim(); item.Price = this.numericUpDown_Price.Value; //20180602增加默认线上价格 // item.EmOnlinePrice = item.Price; item.CostPrice = this.numericUpDownCostPrice.Value; item.SalePrice = numericTextBoxSalePrice.Value; item.SupplierID = ValidateUtil.CheckEmptyValue(this.skinComboBox_SupplierID.SelectedValue); String brandId = ValidateUtil.CheckEmptyValue(this.skinComboBox_Brand.SelectedValue); if (brandId != null) { item.BrandID = int.Parse(brandId); } if (!String.IsNullOrEmpty(this.skinComboBox_Year.SelectedValue?.ToString())) { item.Year = int.Parse(this.skinComboBox_Year.SelectedValue.ToString()); } item.Property = (byte)(CostumeProperty)this.skinCmbProperty.SelectedValue; item.Season = ValidateUtil.CheckEmptyValue(this.skinComboBox_Season.skinComboBox.SelectedValue); item.ClassID = this.skinComboBoxBigClass.SelectedValue.ClassID; // item.Photo = null;//图片不缓存本地 List <ListItem <String> > colorList = null; if (this.dataGridView != null && this.dataGridView.DataSource != null) { colorList = (List <ListItem <String> >) this.dataGridView.DataSource; } item.Colors = CommonGlobalUtil.GetColorFromGridView(colorList); item.Remarks = this.skinTextBox_Remarks.Text.Trim(); item.IsValid = true; item.SizeGroupName = selectSizeGroup.SizeGroup.SizeGroupName; item.SizeNames = selectSizeGroup.SelectedSizeNames; return(item); }
private void BaseButton_Search_Click(object sender, EventArgs e) { try { if (CommonGlobalUtil.EngineUnconnectioned(this)) { return; } string costumeID = string.IsNullOrEmpty(this.costumeTextBox1.SkinTxt.Text) ? null : this.costumeTextBox1.SkinTxt.Text; String color = ((CostumeColor)skinComboBox_Color.SelectedItem).Name;// ValidateUtil.CheckEmptyValue(); String size = ValidateUtil.CheckEmptyValue(skinComboBox_Size.SelectedValue); if (color == CommonGlobalUtil.COMBOBOX_ALL) { color = String.Empty; } // this.dataGridViewPagingSumCtrl.PageSize = int.MaxValue; this.pagePara = new GetCostumeStoreChangePara() { // CostumeStoreChangeType = ValidateUtil.CheckEmptyValue(this.skinComboBoxChangeType.SelectedValue), CostumeID = costumeID, StartDate = new CJBasic.Date(this.dateTimePicker_Start.Value), EndDate = new CJBasic.Date(this.dateTimePicker_End.Value), ColorName = color, SizeName = size, ShopID = shopID, }; CostumeStoreChange listPage = CommonGlobalCache.ServerProxy.GetCostumeStoreChange(this.pagePara); // dataGridViewPagingSumCtrl.Initialize(listPage); // SetSpanInfo(); this.BindingSource(listPage); } catch (Exception ee) { ShowError(ee); } finally { UnLockPage(); } }