Пример #1
0
        private void dataGridView1_CellValueChanged(object sender, DataGridViewCellEventArgs e)
        {
            try
            {
                if (e.RowIndex >= 0 && e.ColumnIndex >= 0 && !dataGridView1.Rows[e.RowIndex].IsNewRow)
                {
                    DataGridView view = (DataGridView)sender;
                    List <EmCarriageCostTemplate> list = (List <EmCarriageCostTemplate>)view.DataSource;
                    EmCarriageCostTemplate        item = (EmCarriageCostTemplate)list[e.RowIndex];
                    switch (view.Rows[e.RowIndex].Cells[e.ColumnIndex].OwningColumn.HeaderText)
                    {
                    //case "推荐":
                    //    item.EmIsRecommand = (bool)this.dataGridView1[e.ColumnIndex, e.RowIndex].Value;
                    //    Recommend(item);

                    //    break;
                    default: break;
                    }
                }
            }
            catch (Exception ex)
            {
                GlobalUtil.ShowError(ex);
            }
        }
Пример #2
0
        private void Form_ItemSelected(GiftTicket ticket, EventArgs t2)
        {
            try
            {
                if (ticket != null)
                {
                    //重新设置匹配
                    ticket.CostumeID         = match.Retail.CostumeID;
                    match.Retail.GiftTickets = ticket.ID;
                    match.Ticket             = ticket;
                    // List<GiftTicket> memberList = (List<GiftTicket>)this.dataGridView1.DataSource;

                    //match
                    //重新设置match



                    GiftTicketList[index] = ticket;
                    BindingDataSource();
                }
            }
            catch (Exception ee)
            {
                GlobalUtil.ShowError(ee);
            }
        }
Пример #3
0
 private void Initialize()
 {
     if (this.curReplenishOrder == null)
     {
         return;
     }
     try
     {
         DataGridViewUtil.SetAlternatingColor(dataGridView1, Color.Gainsboro, Color.White);
         this.skinTextBox_OrderID.Text = "补货申请单号:" + this.curReplenishOrder.ID;
         this.skinLabel_ShopName.Text  = "店铺名称:" + GlobalCache.GetShopName(this.curReplenishOrder.ShopID);
         curReplenishDetailList        = GlobalCache.ServerProxy.GetReplenishDetail(this.curReplenishOrder.ID);
         foreach (var item in curReplenishDetailList)
         {
             Costume costume = CommonGlobalCache.GetCostume(item.CostumeID);
             if (costume != null)
             {
                 item.CostPrice = costume.CostPrice;
             }
         }
         this.BindingSource(curReplenishDetailList);
     }
     catch (Exception ex)
     {
         GlobalUtil.ShowError(ex);
     }
 }
Пример #4
0
 private void dataGridViewPagingSumCtrl_CurrentPageIndexChanged(int index)
 {
     try
     {
         if (this.pagePara == null)
         {
             return;
         }
         if (GlobalUtil.EngineUnconnectioned(this))
         {
             return;
         }
         pagePara.PageIndex = index;
         EmOrderPage listPage = GlobalCache.EMallServerProxy.GetEmOrderPage(this.pagePara);
         this.BindingDataSource(listPage);
     }
     catch (Exception ee)
     {
         GlobalUtil.ShowError(ee);
     }
     finally
     {
         GlobalUtil.UnLockPage(this);
     }
 }
Пример #5
0
        private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            if (!DataGridViewUtil.CheckPerrmisson(this, sender, e))
            {
                return;
            }
            try
            {
                // MessageBox.Show(string.Format("当前点中的是第{0}列,第{1}行", e.ColumnIndex, e.RowIndex));
                if (e.RowIndex > -1 && e.ColumnIndex > -1)
                {
                    List <GiftTicket> memberList = (List <GiftTicket>) this.dataGridView1.DataSource;

                    switch (this.dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value)
                    {
                    case "选择优惠券":
                        if (!String.IsNullOrEmpty(memberList[e.RowIndex].ID))
                        {
                            ChooseGiftTicket(e.RowIndex);
                        }
                        break;

                    default:
                        break;
                    }
                }
            }
            catch (Exception ee)
            {
                GlobalUtil.ShowError(ee);
            }
        }
Пример #6
0
        //点击查询销售单
        private void BaseButton1_Click(object sender, EventArgs e)
        {
            try
            {
                if (GlobalUtil.EngineUnconnectioned(this))
                {
                    return;
                }

                String orderID   = retailOrderIDTextBox1.SkinTxt.Text;
                string costumeID = this.CostumeCurrentShopTextBox1.SkinTxt.Text;
                if (!string.IsNullOrEmpty(orderID))
                {
                    retailOrderIDTextBox1.Focus();
                    SendKeys.SendWait("{Enter}");
                }
                else if (!string.IsNullOrEmpty(costumeID))
                {
                    RetailOrderSelectForm orderSelectForm = new RetailOrderSelectForm(costumeID, shopID, false);
                    orderSelectForm.RetailOrderSelected += OrderSelectForm_RetailOrderSelected;
                    orderSelectForm.ShowDialog();
                }
            }
            catch (Exception ee)
            {
                GlobalUtil.ShowError(ee);
            }
            finally
            {
                GlobalUtil.UnLockPage(this);
            }
        }
Пример #7
0
 private void BaseButtonQuery_Click(object sender, EventArgs e)
 {
     try
     {
         if (GlobalUtil.EngineUnconnectioned(this))
         {
             return;
         }
         para = new GetPfCustomerPage4DistributorPara()
         {
             DistributorID = item.ID,
             PageIndex     = 0,
             PageSize      = dataGridViewPagingSumCtrl.PageSize
         };
         PfCustomerPage page = GlobalCache.ServerProxy.GetPfCustomerPage4Distributor(para);
         dataGridViewPagingSumCtrl.OrderPara = para;
         dataGridViewPagingSumCtrl.Initialize(page);
         BindingDataSource(page);
     }
     catch (Exception ex)
     {
         GlobalUtil.ShowError(ex);
     }
     finally
     {
         GlobalUtil.UnLockPage(this);
     }
 }
Пример #8
0
 private void BaseButton_Search_Click(object sender, EventArgs e)
 {
     try
     {
         if (GlobalUtil.EngineUnconnectioned(this))
         {
             return;
         }
         string orderID = string.IsNullOrEmpty(this.skinTextBox_OrderID.SkinTxt.Text) ? null : this.skinTextBox_OrderID.SkinTxt.Text;
         this.pagePara = new ScrapPagePara()
         {
             ScrapOrderID = orderID,
             StartDate    = new CJBasic.Date(this.dateTimePicker_Start.Value),
             EndDate      = new CJBasic.Date(this.dateTimePicker_End.Value),
             PageIndex    = 0,
             PageSize     = this.dataGridViewPagingSumCtrl.PageSize,
             ShopID       = ValidateUtil.CheckEmptyValue(this.skinComboBoxShopID.SelectedValue),
             CostumeID    = ValidateUtil.CheckEmptyValue(skinTextBox_costumeID.SkinTxt.Text)
         };
         ScrapPage listPage = GlobalCache.ServerProxy.GetScrapPage(this.pagePara);
         dataGridViewPagingSumCtrl.OrderPara = pagePara;
         this.dataGridViewPagingSumCtrl.Initialize(listPage);
         this.BindingScrapOrderSource(listPage);
     }
     catch (Exception ee)
     {
         GlobalUtil.ShowError(ee);
     }
     finally
     {
         GlobalUtil.UnLockPage(this);
     }
 }
Пример #9
0
        private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            if (!DataGridViewUtil.CheckPerrmisson(this, sender, e))
            {
                return;
            }
            try
            {
                if (e.RowIndex > -1 && e.ColumnIndex > -1 && !dataGridView1.Rows[e.RowIndex].IsNewRow)
                {
                    DataGridView         view = (DataGridView)sender;
                    List <EmRefundOrder> list = (List <EmRefundOrder>)view.DataSource;
                    EmRefundOrder        item = (EmRefundOrder)list[e.RowIndex];
                    //  splitContainer1.Panel2Collapsed = true;
                    switch (view.Rows[e.RowIndex].Cells[e.ColumnIndex].OwningColumn.HeaderText)
                    {
                    case "查看物流":
                        splitContainer1.Panel2Collapsed = false;
                        this.LogisticsClick?.Invoke(item, this.splitContainer1.Panel2);
                        break;

                    case "退货状态":
                        splitContainer1.Panel2Collapsed = false;
                        this.DetailClick?.Invoke(item, this, this.splitContainer1.Panel2);
                        break;

                    default: break;
                    }
                }
            }
            catch (Exception ex)
            {
                GlobalUtil.ShowError(ex);
            }
        }
Пример #10
0
        private void Initialize()
        {
            try
            {
                DataGridViewUtil.SetAlternatingColor(dataGridView1, Color.Gainsboro, Color.White);
                //默认选择总仓
                skinComboBoxShopID.Initialize(true);
                ResetAll();
                GeneralStoreShopID = GlobalCache.GeneralStoreShopID;
                this.skinComboBoxShopID.SelectedValue = GeneralStoreShopID;

                if (order != null)
                { //冲单重做
                    dateTimePicker_Start.Value       = order.CreateTime;
                    skinComboBoxShopID.SelectedValue = order.ShopID;
                    List <ScrapDetail> scrapDetails = GlobalCache.ServerProxy.GetScrapDetails(order.ID);
                    this.skinTextBox_Remarks.Text = order.Remarks;
                    curOutboundDetailList         = ToBoundDetail(scrapDetails);
                }

                this.BindingSource(curOutboundDetailList);
            }
            catch (Exception ex)
            {
                GlobalUtil.ShowError(ex);
            }
        }
        private void BaseButtonConfirm_Click(object sender, EventArgs e)
        {
            try
            {
                if (GlobalUtil.EngineUnconnectioned(this))
                {
                    return;
                }
                List <PfCustomerDetail> details = (List <PfCustomerDetail>) this.dataGridView1.DataSource;
                InteractResult          result  = GlobalCache.EMallServerProxy.PfCustomerOrderDelivery(this.Order.ID, GlobalCache.CurrentUserID, details.FindAll(t => t.IsSelected));
                switch (result.ExeResult)
                {
                case ExeResult.Error:
                    GlobalMessageBox.Show(this.FindForm(), result.Msg);
                    break;

                case ExeResult.Success:
                    GlobalMessageBox.Show("发货成功!");
                    TabPage_Close(this.CurrentTabPage, this.SourceCtrlType);
                    break;

                default:
                    break;
                }
            }
            catch (Exception ex)
            {
                GlobalUtil.ShowError(ex);
            }
            finally
            {
                GlobalUtil.UnLockPage(this);
            }
        }
Пример #12
0
        private void BaseButton_Add_Click(object sender, EventArgs e)
        {
            try
            {
                if (this.curSelectedCostumeStoreList == null || this.curSelectedCostumeStoreList.Count == 0)
                {
                    return;
                }
                List <CostumeStore> costumeStoreList = this.curSelectedCostumeStoreList;

                foreach (CostumeStore store in costumeStoreList)
                {
                    if (store.Title == "库存" || store.SumCount == 0)
                    {
                        continue;
                    }
                    BoundDetail detail = this.CostumeStoreConvertToOutboundDetail(store);
                    this.OutboundDetailListAddItem(detail);
                }



                //清空dataGirdView1的绑定源
                this.costumeFromShopTextBox1.Text = string.Empty;
                this.dataGridView1.DataSource     = null;
                this.BindingOutboundDetailSource();
                this.costumeFromShopTextBox1.Focus();
            }
            catch (Exception ee)
            {
                GlobalUtil.ShowError(ee);
            }
        }
Пример #13
0
        private void BaseButton_Search_Click(object sender, EventArgs e)
        {
            try
            {
                if (GlobalUtil.EngineUnconnectioned(this))
                {
                    return;
                }
                //  pagePara = new GetEmCarriageCostTemplatePagePara()
                //{
                //    PageIndex = 0,
                //    PageSize = this.dataGridViewPagingSumCtrl.PageSize
                //};

                // EmCarriageCostTemplatePage listPage = GlobalCache.EMallServerProxy.(this.pagePara);
                // this.dataGridViewPagingSumCtrl.Initialize(listPage);
                //  this.BindingDataSource(listPage);
            }
            catch (Exception ex)
            {
                GlobalUtil.ShowError(ex);
            }
            finally
            {
                GlobalUtil.UnLockPage(this);
            }
        }
Пример #14
0
        private void baseButtonSearch_Click(object sender, EventArgs e)
        {
            try
            {
                if (GlobalUtil.EngineUnconnectioned(this))
                {
                    return;
                }

                this.pagePara = new Core.Dev.InteractEntity.CarriageCostTemplatePagePara()
                {
                    IsValid   = -1,
                    Name      = skinTextBoxTitle.Text,
                    PageIndex = 0,
                    PageSize  = dataGridViewPagingSumCtrl.PageSize,
                };
                CarriageCostTemplatePage listPage = GlobalCache.EMallServerProxy.GetCarriageCostTemplatePage(pagePara);
                dataGridViewPagingSumCtrl.OrderPara = pagePara;
                dataGridViewPagingSumCtrl.Initialize(listPage);
                this.BindingDataSource(listPage);
            }
            catch (Exception ex)
            {
                GlobalUtil.ShowError(ex);
            }
            finally
            {
                GlobalUtil.UnLockPage(this);
            }
        }
Пример #15
0
        private void applyRefund()
        {
            try
            {
                if (GlobalMessageBox.Show("是否确认操作?", "确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) != DialogResult.Yes)
                {
                    return;
                }
                if (GlobalUtil.EngineUnconnectioned(this))
                {
                    return;
                }

                AgreeRefundPara para = new AgreeRefundPara()
                {
                    EmRefundOrderID = Order.ID,
                    OperateID       = CommonGlobalCache.CurrentUserID
                };
                RefundResult result = GlobalCache.EMallServerProxy.AgreeRefund(para);
                switch (result)
                {
                case RefundResult.Success:
                    GlobalMessageBox.Show("已同意退款!");
                    //this.baseButtonOutbound.Visible = false;
                    this.baseButtonRefused.Visible = false;
                    Order.RefundState = 2;
                    //  updateBaseButtonApplyRefund();
                    //baseButtonApplyRefund.Visible = false;
                    this.RefreshPageAction?.Invoke(this.CurrentTabPage, this.SourceCtrlType);
                    break;

                case RefundResult.StateIsError:
                    GlobalMessageBox.Show("退款申请状态不符合要求!");
                    break;

                case RefundResult.IsRefund:
                    GlobalMessageBox.Show("已经退过货!");
                    break;

                case RefundResult.MemberIsNotExist:
                    GlobalMessageBox.Show("会员不存在!");
                    break;

                case RefundResult.Error:
                    GlobalMessageBox.Show("内部错误!");
                    break;

                default:
                    break;
                }
            }
            catch (Exception ex)
            {
                GlobalUtil.ShowError(ex);
            }
            finally
            {
                GlobalUtil.UnLockPage(this);
            }
        }
Пример #16
0
        private void BaseButton_Search_Click(object sender, EventArgs e)
        {
            try
            {
                if (GlobalUtil.EngineUnconnectioned(this))
                {
                    return;
                }
                pagePara = new GetPfCustomerOrderPagePara()
                {
                    CustomerOrderId      = this.skinTextBoxOrderId.Text,
                    StartDate            = new Date(this.dateTimePicker_Start.Value),
                    EndDate              = new Date(this.dateTimePicker_End.Value),
                    PageIndex            = 0,
                    PageSize             = this.dataGridViewPagingSumCtrl.PageSize,
                    PfCustomerID         = (String)this.skinComboBox_PfCustomer.SelectedValue,
                    CostumeID            = this.skinTextBoxID.Text,
                    PfCustomerOrderState = (PfCustomerOrderState)(this.skinComboBoxOrderState.SelectedValue),
                };

                dataGridViewPagingSumCtrl.OrderPara = pagePara;
                PfCustomerOrderPage listPage = GlobalCache.EMallServerProxy.GetPfCustomerOrderPage(this.pagePara);
                this.dataGridViewPagingSumCtrl.Initialize(listPage);
                this.BindingDataSource(listPage);
                UpdateTabPageTitle(false);
            }
            catch (Exception ex)
            {
                GlobalUtil.ShowError(ex);
            }
            finally
            {
                GlobalUtil.UnLockPage(this);
            }
        }
Пример #17
0
 private void dataGridViewRuleExpression_CellClick(object sender, DataGridViewCellEventArgs e)
 {
     if (!DataGridViewUtil.CheckPerrmisson(this, sender, e))
     {
         return;
     }
     try
     {
         DataGridView view = (DataGridView)sender;
         if (e.RowIndex > -1 && e.ColumnIndex > -1)
         {
             List <Rule> list = DataGridViewUtil.BindingListToList <Rule>(view.DataSource);//(List<ListItem<String>>)view.DataSource;
             switch (view.Rows[e.RowIndex].Cells[e.ColumnIndex].Value)
             {
             case "删除":
                 Rule selectedItem = (Rule)view.Rows[e.RowIndex].DataBoundItem;
                 view.DataSource = null;
                 list.Remove(selectedItem);
                 view.DataSource = DataGridViewUtil.ListToBindingList <Rule>(list);
                 UpdateRule(view);
                 break;
             }
         }
     }
     catch (Exception ex)
     {
         GlobalUtil.ShowError(ex);
     }
     finally
     {
         GlobalUtil.UnLockPage(this);
     }
 }
Пример #18
0
        private void EmOrderManageCtrl_Load(object sender, EventArgs e)
        {
            try
            {
                splitContainer1.Panel2Collapsed = true;
                dataGridView1.DataSource        = null;
                pagePara = new GetPfCustomerOrderPagePara()
                {
                    CustomerOrderId      = this.skinTextBoxOrderId.Text,
                    StartDate            = new Date(this.dateTimePicker_Start.Value),
                    EndDate              = new Date(this.dateTimePicker_End.Value),
                    PageIndex            = 0,
                    PageSize             = this.dataGridViewPagingSumCtrl.PageSize,
                    PfCustomerID         = (String)this.skinComboBox_PfCustomer.SelectedValue,
                    CostumeID            = this.skinTextBoxID.Text,
                    PfCustomerOrderState = (PfCustomerOrderState)(this.skinComboBoxOrderState.SelectedValue),
                };

                dataGridViewPagingSumCtrl.OrderPara = pagePara;
                //  BaseButton_Search_Click(null,null);
            }
            catch (Exception ex)
            {
                GlobalUtil.ShowError(ex);
            }
        }
Пример #19
0
        private void form_ConfirmClick_Edit(PfCustomer item, SaveOffLineCustomerForm form)
        {
            try
            {
                if (GlobalUtil.EngineUnconnectioned(this))
                {
                    return;
                }
                UpdateResult result = GlobalCache.ServerProxy.UpdateDistributor(item.ID, item.Name, item.Password);
                switch (result)
                {
                case UpdateResult.Success:
                    form.DialogResult = DialogResult.OK;
                    RefreshPage();
                    break;

                case UpdateResult.Error:
                    GlobalMessageBox.Show("内部错误!");
                    form.Cancel();
                    break;

                default:
                    break;
                }
            }
            catch (Exception ex)
            {
                GlobalUtil.ShowError(ex);
            }
            finally
            {
                GlobalUtil.UnLockPage(this);
            }
        }
Пример #20
0
 private void UpdateTabPageTitle(bool show = false)
 {
     try
     {
         if (show)
         {
             PfCustomerOrderCount states = GlobalCache.EMallServerProxy.GetPfCustomerOrderCount();
             tabPageWaitDeliver.Text  = EnumHelper.GetDescription(PfCustomerOrderState.WaitDelivery);
             tabPageWaitDeliver.Text += states.WaitDelivery == 0 ? String.Empty: "(" + states.WaitDelivery + ")";
             tabPagePartDeliver.Text  = EnumHelper.GetDescription(PfCustomerOrderState.PartDelivery);
             tabPagePartDeliver.Text += states.WaitDelivery == 0 ? String.Empty : "(" + states.PartDelivery + ")";
         }
         else
         {
             tabPageWaitDeliver.Text = EnumHelper.GetDescription(PfCustomerOrderState.WaitDelivery);
             tabPagePartDeliver.Text = EnumHelper.GetDescription(PfCustomerOrderState.PartDelivery);
         }
     }
     catch (Exception ex)
     {
         GlobalUtil.ShowError(ex);
     }
     finally
     {
         tabControl1.Invalidate();
     }
 }
Пример #21
0
 private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
 {
     try
     {
         if (!DataGridViewUtil.CheckPerrmisson(this, sender, e))
         {
             return;
         }
         if (e.RowIndex < 0 || e.ColumnIndex < 0)
         {
             return;
         }
         DataGridView view = sender as DataGridView;
         PfCustomer   item = view.Rows[e.RowIndex].DataBoundItem as PfCustomer;
         if (ColumnEdit.Index == e.ColumnIndex)
         {
             //修改
             Edit(item);
         }
     }
     catch (Exception ex)
     {
         GlobalUtil.ShowError(ex);
     }
 }
Пример #22
0
        private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            if (!DataGridViewUtil.CheckPerrmisson(this, sender, e))
            {
                return;
            }
            try
            {
                if (e.RowIndex > -1 && e.ColumnIndex > -1)
                {
                    List <Brand> list = DataGridViewUtil.BindingListToList <Brand>(dataGridView1.DataSource);
                    Brand        item = (Brand)list[e.RowIndex];
                    switch (this.dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value)
                    {
                    case "编辑":
                        Edit(item);
                        break;

                    case "删除":
                        Delete(list, item);
                        break;
                    }
                }
            }
            catch (Exception ex)
            {
                GlobalUtil.ShowError(ex);
            }
            finally
            {
                GlobalUtil.UnLockPage(this);
            }
        }
Пример #23
0
        private void ShowDeliver(EmRetailOrder item)
        {
            try
            {
                EmOrderDeliverForm2 form = new EmOrderDeliverForm2(item);
                // form.RefreshPageAction += EmOrderDeliverForm_RefreshPageAction;
                if (form.ShowDialog(this) == DialogResult.OK)
                {
                    if (GlobalMessageBox.Show("是否确认操作?", "确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                    {
                        if (GlobalUtil.EngineUnconnectioned(this))
                        {
                            return;
                        }

                        para = form.Result;
                        CJBasic.CbGeneric cb = new CJBasic.CbGeneric(this.GetInfo);
                        cb.BeginInvoke(null, null);
                    }
                }
            }
            catch (Exception ex) { GlobalUtil.ShowError(ex); }
            finally
            {
                //   GlobalUtil.UnLockPage(this);
            }
        }
Пример #24
0
 //自动添加补货申请单到补货列表中
 private void BaseButton_AutoReplenish_Click(object sender, EventArgs e)
 {
     try
     {
         if (GlobalUtil.EngineUnconnectioned(this))
         {
             return;
         }
         this.SetCostumeDetails(null);
         AutoReplenishCostumePara para = new AutoReplenishCostumePara()
         {
             ShopID    = shopID,
             StartDate = new CJBasic.Date(this.dateTimePicker_Start.Value),
             EndDate   = new CJBasic.Date(this.dateTimePicker_End.Value)
         };
         List <ReplenishDetail> autoReplenishDetailList = GlobalCache.ServerProxy.AutoReplenishCostume(para);
         if (autoReplenishDetailList != null && autoReplenishDetailList.Count > 0)
         {
             this.curReplenishDetailList = autoReplenishDetailList;
             this.BindingReplenishDetailSource();
         }
     }
     catch (Exception ee)
     {
         GlobalUtil.ShowError(ee);
     }
     finally
     {
         GlobalUtil.UnLockPage(this);
     }
 }
Пример #25
0
        private void ChooseGiftTicket(int index)
        {
            try
            {
                //  costumeID = ticket.CostumeID;
                this.match = matches[index];
                this.index = index;
                List <GiftTicket> canChooseTickets = new List <GiftTicket>();


                foreach (var item in ValidatedTickets)
                {
                    //匹配条件才能添加
                    String[]      retailMatchTickets    = MatchRetails[index].MatchGiftTickets.Split(',');
                    List <String> retailMatchTicketList = new List <string>(retailMatchTickets);


                    if (!GiftTicketList.Exists(t => t.ID == item.ID) && retailMatchTicketList.Contains(item.ID))
                    {
                        canChooseTickets.Add(item);
                    }
                }

                //把自己加进去
                canChooseTickets.Add(match.Ticket);
                ChooseGiftTicketForm form = new ChooseGiftTicketForm(canChooseTickets);
                form.ItemSelected += Form_ItemSelected;
                form.ShowDialog();
            }
            catch (Exception ee)
            {
                GlobalUtil.ShowError(ee);
            }
        }
Пример #26
0
        private void buttonSave_Click(object sender, EventArgs e)
        {
            try
            {
                if (GlobalUtil.EngineUnconnectioned(this))
                {
                    return;
                }
                //
                List <EmExpressCompany> companys = DataGridViewUtil.BindingListToList <EmExpressCompany>(dataGridView1.DataSource);

                foreach (var item in companys)
                {
                    UpdateCompany(item);
                }
                GlobalMessageBox.Show("保存成功!");
            }
            catch (Exception ee)
            {
                GlobalUtil.ShowError(ee);
            }
            finally
            {
                GlobalUtil.UnLockPage(this);
            }
        }
Пример #27
0
 private void BaseButton_Add_Click(object sender, EventArgs e)
 {
     try
     {
         if (this.curSelectedCostumeStoreList == null || this.curSelectedCostumeStoreList.Count == 0)
         {
             return;
         }
         List <CostumeStore> costumeStoreList = this.curSelectedCostumeStoreList.FindAll((x) => x.Title == "补货申请");
         AddStoreCache(this.curSelectedCostumeStoreList.FindAll((x) => x.Title == "库存"));
         foreach (CostumeStore store in costumeStoreList)
         {
             if (store.SumCount == 0)
             {
                 continue;
             }
             ReplenishDetail detail = this.CostumeStoreConvertToReplenishDetail(store, "");
             this.ReplenishDetailListAddItem(detail);
         }
         //清空dataGirdView1的绑定源
         this.SetCostumeDetails(null);
         this.BindingReplenishDetailSource();
         this.CostumeCurrentShopTextBox1.Focus();
     }
     catch (Exception ee)
     {
         GlobalUtil.ShowError(ee);
     }
 }
Пример #28
0
        private void SetRetailOrderInfo()
        {
            try
            {
                if (GlobalUtil.EngineUnconnectioned(this))
                {
                    return;
                }
                EmRetailOrder retailOrder = GlobalCache.EMallServerProxy.GetOneEmRetailOrder(this.Order.EmRetailOrderID);

                skinLabelDiscountAmount.Text = retailOrder.MoneyDeductedByTicket.ToString();
                if (retailOrder.State == 0)
                {
                    this.skinLabelOrderPayTime.Text = String.Empty;
                }
                else
                {
                    this.skinLabelOrderPayTime.Text = retailOrder.TimePay.ToString(DateTimeUtil.DEFAULT_DATETIME_FORMAT);
                }

                this.skinLabelSalePrice.Text = retailOrder.TotalEmOnlinePrice.ToString(); //(retailOrder.TotalMoneyReceived - retailOrder.CarriageCost).ToString();
                //   this.skinLabelCarriage.Text = retailOrder.CarriageCost.ToString();
                this.skinLabelOrderPayAmount.Text = retailOrder.TotalMoneyReceived.ToString();
            }
            catch (Exception ex)
            {
                GlobalUtil.ShowError(ex);
            }
            finally
            {
                GlobalUtil.UnLockPage(this);
            }
        }
Пример #29
0
        private void Form_ItemSelected(GiftTicket ticket, EventArgs t2)
        {
            try
            {
                if (ticket != null)
                {
                    //重新设置匹配
                    this.giftTicketList = ticket.ID;
                    this.discountMoney  = ticket.Denomination;
                    this.textBox1.Text  = ticket.Denomination.ToString();

                    /*  ticket = match.Retail.CostumeID;
                     * match.Retail.GiftTickets = ticket.ID;
                     * match.Ticket = ticket;
                     * // List<GiftTicket> memberList = (List<GiftTicket>)this.dataGridView1.DataSource;
                     *
                     * //match
                     * //重新设置match
                     *
                     *
                     *
                     *
                     * GiftTicketList[index] = ticket;
                     * BindingDataSource();*/
                }
            }
            catch (Exception ee)
            {
                GlobalUtil.ShowError(ee);
            }
        }
Пример #30
0
        private void UpSaleNum(string itemID, int SaleNum)
        {
            try
            {
                if (GlobalUtil.EngineUnconnectioned(this))
                {
                    return;
                }
                InteractResult result = GlobalCache.ServerProxy.UpdateEmSales(itemID, SaleNum);
                switch (result.ExeResult)
                {
                case ExeResult.Success:
                    break;

                case ExeResult.Error:
                    GlobalMessageBox.Show("内部错误!");
                    break;

                default:
                    break;
                }
            }
            catch (Exception ee)
            {
                GlobalUtil.ShowError(ee);
            }
            finally
            {
                GlobalUtil.UnLockPage(this);
            }
        }