Exemplo n.º 1
0
        private void dataGridView_RefundDetail_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            if (!DataGridViewUtil.CheckPerrmisson(this, sender, e))
            {
                return;
            }
            if (e.RowIndex < 0 || e.ColumnIndex < 0)
            {
                return;
            }
            clickValue = dataGridView_RefundDetail.Rows[e.RowIndex].Cells[e.ColumnIndex].Value;
            String content = CommonGlobalUtil.ConvertToString(clickValue);

            MonthTask item = dataGridView_RefundDetail.Rows[e.RowIndex].DataBoundItem as MonthTask;

            if (content == "设置日目标")
            {
                curMonthTask = item;
                ShowDayTask(null, curMonthTask);
            }
            else if (content == "查看日目标")
            {
                curMonthTask = item;
                ShowDayTask(null, curMonthTask, true);
            }
        }
Exemplo n.º 2
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<ListItem<String>> list = (List<ListItem<String>>)this.dataGridView1.DataSource;
             List <ListItem <String> > list = DataGridViewUtil.BindingListToList <ListItem <String> >(dataGridView1.DataSource);
             ListItem <String>         item = (ListItem <String>)list[e.RowIndex];
             switch (this.dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value)
             {
             case "删除":
                 this.dataGridView1.DataSource = null;
                 list.Remove(item);
                 UpdateData(list);
                 break;
             }
         }
     }
     catch (Exception ex)
     {
         GlobalUtil.ShowError(ex);
     }
 }
Exemplo n.º 3
0
 private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
 {
     if (!DataGridViewUtil.CheckPerrmisson(this, sender, e))
     {
         return;
     }
     try
     {
         if (e.RowIndex > -1 && e.ColumnIndex > -1)
         {
             List <GiftTicketTemplate> list = DataGridViewUtil.BindingListToList <GiftTicketTemplate>(this.dataGridView1.DataSource);
             GiftTicketTemplate        item = (GiftTicketTemplate)list[e.RowIndex];
             if (ColumnEdit.Index == e.ColumnIndex)
             {
                 Edit(item);
             }
             else if (ColumnDelete.Index == e.ColumnIndex)
             {
                 Delete(list, item);
             }
         }
     }
     catch (Exception ex)
     {
         GlobalUtil.ShowError(ex);
     }
 }
Exemplo n.º 4
0
        private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            if (!DataGridViewUtil.CheckPerrmisson(this, sender, e))
            {
                return;
            }
            try
            {
                if (e.RowIndex >= 0 && e.ColumnIndex >= 0 && !dataGridView1.Rows[e.RowIndex].IsNewRow)
                {
                    DataGridView view = (DataGridView)sender;
                    SizeGroup    item = (SizeGroup)dataGridView1.Rows[e.RowIndex].DataBoundItem;

                    if (e.ColumnIndex == enabledDataGridViewCheckBoxColumn.Index)
                    {
                        item.Enabled = !item.Enabled;
                        DoEnable(item);
                    }
                    else if (e.ColumnIndex == ColumnEdit.Index)
                    {
                        Edit(item);
                    }
                    else if (e.ColumnIndex == ColumnDelete.Index)
                    {
                        Removed(item);
                    }
                }
            }
            catch (Exception ex)
            {
                CommonGlobalUtil.ShowError(ex);
            }
        }
 private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
 {
     if (!DataGridViewUtil.CheckPerrmisson(this, sender, e))
     {
         return;
     }
     if (e.RowIndex < 0 || e.ColumnIndex < 0)
     {
         return;
     }
     try
     {
         List <PfCustomerBalanceRecord> list = (List <PfCustomerBalanceRecord>) this.dataGridView1.DataSource;
         PfCustomerBalanceRecord        item = (PfCustomerBalanceRecord)list[e.RowIndex];
         if (e.ColumnIndex == SourceOrderID.Index)
         {
             this.skinSplitContainer1.Panel2Collapsed = false;
             this.DetailClick?.Invoke(item, this,
                                      this.skinSplitContainer1.Panel2);
         }
     }
     catch (Exception ee)
     {
         CommonGlobalUtil.ShowError(ee);
     }
 }
        private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            if (!DataGridViewUtil.CheckPerrmisson(this, sender, e))
            {
                return;
            }
            if (e.RowIndex < 0 || e.ColumnIndex < 0)
            {
                return;
            }
            try
            {
                if (GlobalUtil.EngineUnconnectioned(this))
                {
                    return;
                }

                List <SupplierAccountRecord> list = (List <SupplierAccountRecord>) this.dataGridView1.DataSource;
                SupplierAccountRecord        item = (SupplierAccountRecord)list[e.RowIndex];
                if (e.ColumnIndex == sourceOrderIDDataGridViewTextBoxColumn.Index)
                {
                    if ((AccountType)item.AccountType == AccountType.PurchaseCollection || (AccountType)item.AccountType == AccountType.Other)
                    {
                        SupplierAccountSearchForm form = new SupplierAccountSearchForm();
                        if (form.ShowDialog(item, true) == DialogResult.OK)
                        {
                            RefreshPage();
                        }
                    }
                    else
                    {
                        SupplierAccountRecordOrderDetailForm form = new SupplierAccountRecordOrderDetailForm();
                        form.ShowDialog(item);
                    }
                    //402 在“供应商往来账明细”窗口内,增加点击单据 弹出单据明细窗口 功能。
                    //   this.skinSplitContainer1.Panel2Collapsed = false;
                    //  this.SourceOrderDetailClick?.Invoke(item.SourceOrderID, this, this.skinSplitContainer1.Panel2);
                }
                else if (e.ColumnIndex == ColumnDelete.Index)
                {
                    Delete(item);
                }
                else if (e.ColumnIndex == ColumnEdit.Index)
                {
                    Edit(item);
                }
                else if (e.ColumnIndex == Column2.Index)
                {
                    PayPrint(item);
                }
            }
            catch (Exception ee)
            {
                GlobalUtil.ShowError(ee);
            }
            finally
            {
                GlobalUtil.UnLockPage(this);
            }
        }
Exemplo n.º 7
0
 private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
 {
     if (!DataGridViewUtil.CheckPerrmisson(this, sender, e))
     {
         return;
     }
     if (e.RowIndex < 0 || e.ColumnIndex < 0)
     {
         return;
     }
     try
     {
         List <DayReport> curDayReportListSource = (List <DayReport>) this.dataGridView1.DataSource;
         DayReport        item = curDayReportListSource[e.RowIndex];
         switch (this.dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value)
         {
         case "明细":
             if (this.DetailClick != null)
             {
                 this.DetailClick(item, this);
             }
             break;
         }
     }
     catch (Exception ex)
     {
         CommonGlobalUtil.WriteLog(ex);
     }
 }
Exemplo n.º 8
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);
     }
 }
Exemplo n.º 9
0
 private void dataGridView_RetailOrder_CellContentClick(object sender, DataGridViewCellEventArgs e)
 {
     if (!DataGridViewUtil.CheckPerrmisson(this, sender, e))
     {
         return;
     }
     if (e.RowIndex < 0 || e.ColumnIndex < 0)
     {
         return;
     }
     try
     {
         List <PfCustomerRetailOrder> source = (List <PfCustomerRetailOrder>) this.dataGridView_RetailOrder.DataSource;
         PfCustomerRetailOrder        item   = source[e.RowIndex];
         if (ColumnEdit.Index == e.ColumnIndex)
         {
             EditDetail(item);
         }
         else
         if (ColumnRemoved.Index == e.ColumnIndex)
         {
             Removed(item);
         }
     }
     catch (Exception ee)
     {
         CommonGlobalUtil.ShowError(ee);
     }
 }
Exemplo n.º 10
0
 private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
 {
     if (!DataGridViewUtil.CheckPerrmisson(this, sender, e))
     {
         return;
     }
     if (e.RowIndex < 0 || e.ColumnIndex < 0)
     {
         return;
     }
     try
     {
         switch (this.dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value)
         {
         case "删除":
             DialogResult dialogResult = GlobalMessageBox.Show("确定删除该条数据?", "提示", MessageBoxButtons.OKCancel);
             if (dialogResult != DialogResult.OK)
             {
                 return;
             }
             //this.dataGridView1.Rows.RemoveAt(e.RowIndex);
             this.curOutbound.OutboundDetails.RemoveAt(e.RowIndex);
             this.BindingOutboundSource();
             break;
         }
     }
     catch (Exception ee)
     {
         CommonGlobalUtil.WriteLog(ee);
     }
 }
Exemplo n.º 11
0
 private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
 {
     if (!DataGridViewUtil.CheckPerrmisson(this, sender, e))
     {
         return;
     }
     try
     {
         if (e.RowIndex > -1 && e.ColumnIndex > -1)
         {
             if (CommonGlobalUtil.ConvertToString(this.dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value) == "删除")
             {
                 DialogResult dialogResult = GlobalMessageBox.Show("确定删除该条数据?", "提示", MessageBoxButtons.OKCancel);
                 if (dialogResult != DialogResult.OK)
                 {
                     return;
                 }
                 RetailDetail detail = this.retailDetailList[e.RowIndex];
                 this.retailDetailList.RemoveAt(e.RowIndex);
                 dataGridViewPagingSumCtrl.BindingDataSource(DataGridViewUtil.ListToBindingList(this.retailDetailList));
             }
             if (e.ColumnIndex == GuideName.Index)
             {
                 RetailDetail detail = this.retailDetailList[e.RowIndex];
                 // detail.GuideID = this.retailDetailList[e.ColumnIndex];
                 detail.GuideID = this.dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString();
                 //detail.GuideName = CommonGlobalCache.GetUserName(detail.GuideID);
             }
         }
     }
     catch (Exception ee)
     {
         GlobalUtil.WriteLog(ee);
     }
 }
        private void dataGridViewCostume_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            if (!DataGridViewUtil.CheckPerrmisson(this, sender, e))
            {
                return;
            }
            try {
                if (e.RowIndex > -1 && e.ColumnIndex > -1)
                {
                    DataGridView view = (DataGridView)sender;
                    List <TKeyValue <decimal, decimal> > list = (List <TKeyValue <decimal, decimal> >)view.DataSource;
                    TKeyValue <decimal, decimal>         item = (TKeyValue <decimal, decimal>)list[e.RowIndex];
                    switch (view.Rows[e.RowIndex].Cells[e.ColumnIndex].Value)
                    {
                    case "删除":
                        view.DataSource = null;
                        list.Remove(item);
                        view.DataSource = list;
                        break;

                    default: break;
                    }
                }
            }
            catch (Exception ex)
            {
                GlobalUtil.ShowError(ex);
            }
        }
Exemplo n.º 13
0
 private void dataGridViewMembers_CellClick(object sender, DataGridViewCellEventArgs e)
 {
     if (!DataGridViewUtil.CheckPerrmisson(this, sender, e))
     {
         return;
     }
     try
     {
         if (e.RowIndex > -1 && e.ColumnIndex > -1)
         {
             /*  List<Member> list = (List<Member>)this.dataGridViewMembers.DataSource;
              * Member item = (Member)list[e.RowIndex];
              * switch (this.dataGridViewMembers.Rows[e.RowIndex].Cells[e.ColumnIndex].Value)
              * {
              *
              *    case "删除":
              *        this.dataGridViewMembers.DataSource = null;
              *        list.Remove(item);
              *        this.dataGridViewMembers.DataSource = list;
              *        break;
              * }*/
         }
     }
     catch (Exception ex)
     {
         CommonGlobalUtil.ShowError(ex);
     }
 }
Exemplo n.º 14
0
        private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            if (!DataGridViewUtil.CheckPerrmisson(this, sender, e))
            {
                return;
            }
            try
            {
                if (e.RowIndex > -1 && e.ColumnIndex > -1)
                {
                    DataGridView      view = (DataGridView)sender;
                    List <PfCustomer> list = (List <PfCustomer>)view.DataSource;
                    PfCustomer        item = (PfCustomer)list[e.RowIndex];
                    switch (view.Rows[e.RowIndex].Cells[e.ColumnIndex].Value)
                    {
                    case "查询":
                        ShowForm(item);
                        break;

                    default: break;
                    }
                }
            }
            catch (Exception ex)
            {
                GlobalUtil.ShowError(ex);
            }
        }
Exemplo n.º 15
0
        private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            if (!DataGridViewUtil.CheckPerrmisson(this, sender, e))
            {
                return;
            }
            if (e.RowIndex < 0 || e.ColumnIndex < 0)
            {
                return;
            }
            try
            {
                DataGridView view = (DataGridView)sender;
                List <GuideDayAchievement> curDayReportListSource = (List <GuideDayAchievement>)view.DataSource;
                GuideDayAchievement        item = curDayReportListSource[e.RowIndex];
                item.ReportDate = Convert.ToInt32(DateTime.Now.Year + "" + DateTime.Now.Month + "" + DateTime.Now.Day);
                switch (view.Rows[e.RowIndex].Cells[e.ColumnIndex].Value)
                {
                case "明细":
                    //   GuideDetailClick(item);
                    form.ShowDialog(curDayReport.ShopID, item.GuideID, curDayReport.ReportDate);

                    break;
                }
            }
            catch (Exception ex)
            {
                CommonGlobalUtil.ShowError(ex);
            }
        }
Exemplo n.º 16
0
 private void dataGridView_CellClick(object sender, DataGridViewCellEventArgs e)
 {
     try
     {
         if (!DataGridViewUtil.CheckPerrmisson(this, sender, e))
         {
             return;
         }
         if (e.RowIndex < 0 || e.ColumnIndex < 0)
         {
             return;
         }
         Distributor item = dataGridView.Rows[e.RowIndex].DataBoundItem as Distributor;
         if (ColumnOffline.Index == e.ColumnIndex)
         {
             //下线客户
             OfflineCustomers(item);
         }
         else if (ColumnEdit.Index == e.ColumnIndex)
         {
             //修改
             Edit(item);
         }
         else if (ColumnNewOffline.Index == e.ColumnIndex)
         {
             //新增下线
             NewOffline(item);
         }
     }
     catch (Exception ex)
     {
         GlobalUtil.ShowError(ex);
     }
 }
Exemplo n.º 17
0
        private void dataGridView_RetailOrder_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            if (!DataGridViewUtil.CheckPerrmisson(this, sender, e))
            {
                return;
            }
            if (e.RowIndex < 0 || e.ColumnIndex < 0)
            {
                return;
            }
            try
            {
                List <RetailOrder> source = DataGridViewUtil.BindingListToList <RetailOrder>(this.dataGridView_RetailOrder.DataSource);
                RetailOrder        item   = source[e.RowIndex];
                if (ColumnRemove.Index == e.ColumnIndex)
                {
                    //冲单
                    Cancel(item);
                }
                else if (ColumnRedo.Index == e.ColumnIndex)
                {
                    Redo(item);
                }
                else if (ColumnPrint.Index == e.ColumnIndex)
                {
                    if (isRefundOrder)
                    {
                        //打印
                        Print(item);
                    }
                    else
                    {
                        PrintRetail(item);
                    }
                }

                else if (Column1.Index == e.ColumnIndex)
                {
                    string fileName = string.Empty;
                    if (isRefundOrder)
                    {
                        fileName = "退货单";
                    }
                    else
                    {
                        fileName = "销售单";
                    }
                    path = CJBasic.Helpers.FileHelper.GetPathToSave("保存文件", fileName + item.ID + new Date(DateTime.Now).ToDateInteger() + ".xls", Environment.GetFolderPath(Environment.SpecialFolder.Personal));
                    if (String.IsNullOrEmpty(path))
                    {
                        return;
                    }
                    Export(item);
                }
            }
            catch (Exception ee)
            {
                CommonGlobalUtil.ShowError(ee);
            }
        }
Exemplo n.º 18
0
 private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
 {
     if (!DataGridViewUtil.CheckPerrmisson(this, sender, e))
     {
         return;
     }
     try
     {
         if (e.RowIndex > -1 && e.ColumnIndex > -1)
         {
             if (CommonGlobalUtil.ConvertToString(this.dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value) == "删除")
             {
                 //DialogResult dialogResult = GlobalMessageBox.Show("确定删除该条数据?", "提示", MessageBoxButtons.OKCancel);
                 //if (dialogResult != DialogResult.OK)
                 //{
                 //    return;
                 //}
                 PfCustomerRetailDetail detail = this.PfCustomerRetailDetailList[e.RowIndex];
                 this.PfCustomerRetailDetailList.RemoveAt(e.RowIndex);
                 dataGridViewPagingSumCtrl.BindingDataSource(this.PfCustomerRetailDetailList);
             }
         }
     }
     catch (Exception ee)
     {
         GlobalUtil.WriteLog(ee);
     }
 }
 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);
     }
 }
Exemplo n.º 20
0
        private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            if (!DataGridViewUtil.CheckPerrmisson(this, sender, e))
            {
                return;
            }
            if (e.RowIndex < 0 || e.ColumnIndex < 0)
            {
                return;
            }
            try
            {
                //List <PurchaseOrder> curReturnOrderListSource = (List<PurchaseOrder>)this.dataGridView1.DataSource;
                //PurchaseOrder item = curReturnOrderListSource[e.RowIndex];

                //if (ColumnOrder.Index == e.ColumnIndex) {
                //        this.skinSplitContainer1.Panel2Collapsed = false;
                //        this.DetailClick?.Invoke(item, this.skinSplitContainer1.Panel2,false);
                //} else if (ColumnPrint.Index== e.ColumnIndex) {
                //        this.DetailClick?.Invoke(item, this.skinSplitContainer1.Panel2,true);

                //}
            }
            catch (Exception ex)
            {
                GlobalUtil.WriteLog(ex);
            }
        }
Exemplo n.º 21
0
 private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
 {
     if (!DataGridViewUtil.CheckPerrmisson(this, sender, e))
     {
         return;
     }
     if (e.RowIndex < 0 || e.ColumnIndex < 0)
     {
         return;
     }
     try
     {
         List <PurchaseOrder> curPurchaseOrderListSource = (List <PurchaseOrder>) this.dataGridView1.DataSource;
         PurchaseOrder        item = curPurchaseOrderListSource[e.RowIndex];
         switch (this.dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].OwningColumn.HeaderText)
         {
         case "采购进货单明细":
             if (this.DetailClick != null)
             {
                 this.skinSplitContainer1.Panel2Collapsed = false;
                 this.DetailClick(item, this.skinSplitContainer1.Panel2);
             }
             break;
         }
     }
     catch (Exception ex)
     {
         GlobalUtil.WriteLog(ex);
     }
 }
Exemplo n.º 22
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);
            }
        }
Exemplo n.º 23
0
 private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
 {
     if (!DataGridViewUtil.CheckPerrmisson(this, sender, e))
     {
         return;
     }
     if (e.RowIndex < 0 || e.ColumnIndex < 0)
     {
         return;
     }
     try
     {
         List <InboundOrder> list = (List <InboundOrder>) this.dataGridView1.DataSource;
         InboundOrder        item = list[e.RowIndex];
         if (this.dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].OwningColumn.DataPropertyName == iDDataGridViewTextBoxColumn1.DataPropertyName)
         {
             this.skinSplitContainer1.Panel2Collapsed = false;
             this.InboundDetailClick?.Invoke(item, this.skinSplitContainer1.Panel2);
         }
         if (sourceOrderIDDataGridViewTextBoxColumn1.Index == e.ColumnIndex)
         {
             this.skinSplitContainer1.Panel2Collapsed = false;
             this.SourceDetailClick?.Invoke(item.SourceOrderID, this, this.skinSplitContainer1.Panel2);
         }
     }
     catch (Exception ee)
     {
         CommonGlobalUtil.ShowError(ee);
     }
 }
Exemplo n.º 24
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);
     }
 }
Exemplo n.º 25
0
 private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
 {
     if (!DataGridViewUtil.CheckPerrmisson(this, sender, e))
     {
         return;
     }
     try
     {
         if (e.RowIndex > -1 && e.ColumnIndex > -1)
         {
             if (e.ColumnIndex == Column1.Index)
             {
                 PfCustomerRetailDetail detail = this.PfCustomerRetailDetailList[e.RowIndex];
                 this.PfCustomerRetailDetailList.RemoveAt(e.RowIndex);
                 if (PfCustomerRetailDetailList != null && PfCustomerRetailDetailList.Count == 0)
                 {
                     // 删除判断是否整个清空了,如果清空了,则清空客户信息
                     lastAddCustomer = null;
                 }
                 dataGridViewPagingSumCtrl.BindingDataSource(DataGridViewUtil.ListToBindingList(this.PfCustomerRetailDetailList));
             }
         }
     }
     catch (Exception ee)
     {
         GlobalUtil.WriteLog(ee);
     }
 }
Exemplo n.º 26
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);
            }
        }
Exemplo n.º 27
0
        private void dataGridView2_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            if (!DataGridViewUtil.CheckPerrmisson(this, sender, e))
            {
                return;
            }
            if (e.RowIndex < 0 || e.ColumnIndex < 0)
            {
                return;
            }
            try
            {
                DataGridView view = (DataGridView)sender;
                switch (view.Rows[e.RowIndex].HeaderCell.Value)
                {
                case "充值":
                    RechargeClick();
                    break;

                case "收入":
                    SalesCountClick();
                    break;

                case "退货":
                    RefundCountClick();
                    break;
                }
            }
            catch (Exception ex)
            {
                CommonGlobalUtil.ShowError(ex);
            }
        }
Exemplo n.º 28
0
 private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
 {
     if (!DataGridViewUtil.CheckPerrmisson(this, sender, e))
     {
         return;
     }
     if (e.RowIndex < 0 || e.ColumnIndex < 0)
     {
         return;
     }
     try
     {
         List <PfOrder> curReturnOrderListSource = (List <PfOrder>) this.dataGridView1.DataSource;
         PfOrder        item = curReturnOrderListSource[e.RowIndex];
         if (Column1.Index == e.ColumnIndex)
         {
             this.skinSplitContainer1.Panel2Collapsed = false;
             this.DetailClick?.Invoke(item, this.skinSplitContainer1.Panel2, false);
         }
         else if (Column2.Index == e.ColumnIndex)
         {
             this.DetailClick?.Invoke(item, this.skinSplitContainer1.Panel2, true);
         }
         else if (ColumnCancel.Index == e.ColumnIndex)
         {
             this.Cancel(item);
         }
         else if (ColumnRedo.Index == e.ColumnIndex)
         {
             this.Redo(item);
         }
         else if (ColumnPick.Index == e.ColumnIndex)
         {
             this.Pick(item);
         }
         else if (Column4.Index == e.ColumnIndex)
         {
             string fileName = "";
             if (item.IsRefundOrder)
             {
                 fileName = "批发退货单";
             }
             else
             {
                 fileName = "批发发货单";
             }
             path = CJBasic.Helpers.FileHelper.GetPathToSave("保存文件", fileName + item.ID + new Date(DateTime.Now).ToDateInteger() + ".xls", Environment.GetFolderPath(Environment.SpecialFolder.Personal));
             if (String.IsNullOrEmpty(path))
             {
                 return;
             }
             DetailExcept?.Invoke(item, this.skinSplitContainer1.Panel2, path);
         }
     }
     catch (Exception ex)
     {
         GlobalUtil.WriteLog(ex);
     }
 }
Exemplo n.º 29
0
        private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            if (!DataGridViewUtil.CheckPerrmisson(this, sender, e))
            {
                return;
            }
            if (e.RowIndex < 0 || e.ColumnIndex < 0)
            {
                return;
            }
            try
            {
                if (GlobalUtil.EngineUnconnectioned(this))
                {
                    return;
                }

                List <SupplierAccountRecordSummaryInfo> list = DataGridViewUtil.BindingListToList <SupplierAccountRecordSummaryInfo>(dataGridView1.DataSource);
                SupplierAccountRecordSummaryInfo        item = (SupplierAccountRecordSummaryInfo)list[e.RowIndex];
                if (e.ColumnIndex == shouldPayDataGridViewTextBoxColumn.Index)
                {
                    SupplierAccountSummaryShouldPayForm form = new SupplierAccountSummaryShouldPayForm();
                    SupplierAccountRecord4SummaryPara   para = new SupplierAccountRecord4SummaryPara();
                    ReflectionHelper.CopyProperty(this.pagePara, para);
                    para.Type       = SARSQueryType.ShouldPay;
                    para.SupplierID = item.SupplierID;
                    form.ShowDialog(para);
                }
                else if (e.ColumnIndex == otherMoneyDataGridViewTextBoxColumn.Index)
                {
                    SupplierAccountSummaryShouldPayForm form = new SupplierAccountSummaryShouldPayForm();
                    SupplierAccountRecord4SummaryPara   para = new SupplierAccountRecord4SummaryPara();

                    ReflectionHelper.CopyProperty(this.pagePara, para);
                    para.Type       = SARSQueryType.OtherMoney;
                    para.SupplierID = item.SupplierID;
                    form.ShowDialog(para);
                }
                else if (e.ColumnIndex == payMoneyDataGridViewTextBoxColumn.Index)
                {
                    SupplierAccountSummaryShouldPayForm form = new SupplierAccountSummaryShouldPayForm();
                    SupplierAccountRecord4SummaryPara   para = new SupplierAccountRecord4SummaryPara();
                    ReflectionHelper.CopyProperty(this.pagePara, para);
                    para.Type       = SARSQueryType.PayMoney;
                    para.SupplierID = item.SupplierID;
                    form.ShowDialog(para);
                }
            }
            catch (Exception ee)
            {
                GlobalUtil.ShowError(ee);
            }
            finally
            {
                GlobalUtil.UnLockPage(this);
            }
        }
Exemplo n.º 30
0
        //第7列为 编辑按钮    第8列为消费历史按钮
        private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            if (!DataGridViewUtil.CheckPerrmisson(this, sender, e))
            {
                return;
            }
            // MessageBox.Show(string.Format("当前点中的是第{0}列,第{1}行", e.ColumnIndex, e.RowIndex));
            if (e.RowIndex > -1 && e.ColumnIndex > -1)
            {
                List <Member> memberList = (List <Member>) this.dataGridView1.DataSource;

                switch (this.dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value)
                {
                case "编辑":
                    if (this.UpdateMemberClick != null)
                    {
                        this.UpdateMemberClick(memberList[e.RowIndex], this);
                    }
                    break;

                case "消费历史":
                    if (this.ConsumeHistoryClick != null)
                    {
                        RetailListPagePara para = new RetailListPagePara()
                        {
                            IsGetGeneralStore = true,
                            BrandID           = -1,
                            RetailOrderID     = null,
                            IsOpenDate        = false,
                            StartDate         = null,
                            EndDate           = null,
                            PageIndex         = 0,
                            CostumeID         = null,
                            PageSize          = int.MaxValue,
                            RetailOrderType   = RetailOrderType.All,
                            RetailOrderState  = RetailOrderState.IsNormal,
                            ShopID            = null,//所有店铺
                            RetailPayType     = RetailPayType.All,
                            MemberID          = memberList[e.RowIndex].PhoneNumber
                        };
                        this.ConsumeHistoryClick(para, this, true);
                    }
                    break;

                case "充值记录":
                    this.RechargeRecordClick?.Invoke(memberList[e.RowIndex], this);
                    break;

                case "优惠券":
                    this.MemberGiftTicketClick?.Invoke(memberList[e.RowIndex], this);
                    break;
                }
            }
        }