Exemplo n.º 1
0
        internal void ShowDialog(GetCostumeInvoicingDetailPara changePara)
        {
            para = new GetCostumeInvoicingDetailPara();
            ReflectionHelper.CopyProperty(changePara, para);
            CommonGlobalUtil.SetCostomerSaleType(skinComboBox_Type);
            Search(CostumeInvoicingDetailInType.All);

            /* if (!String.IsNullOrEmpty(para.CostumeID)) {
             *   this.Text += ":款号-" + para.CostumeID;
             * }*/
            this.ShowDialog();
        }
Exemplo n.º 2
0
        public void ShowDialog(GetCostumeInvoicingDetailPara changePara)
        {
            try
            {
                para = new GetCostumeInvoicingDetailPara();
                ReflectionHelper.CopyProperty(changePara, para);

                CommonGlobalUtil.SetCostomerPfType(skinComboBox_Type);

                /* switch (para.Type)
                 * {
                 *   case PARSQueryType.ShouldPay:
                 *       accountTypeNameDataGridViewTextBoxColumn.Visible = false;
                 *       createTimeDataGridViewTextBoxColumn.HeaderText = "单据日期";
                 *       accountMoneyDataGridViewTextBoxColumn.HeaderText = "总金额";
                 *       SourceOrderID.Visible = false;
                 *       sourceOrderIDDataGridViewTextBoxColumn.Visible = true;
                 *       this.Text = "应收货款明细";
                 *
                 *       break;
                 *   case PARSQueryType.OtherMoney:
                 *       accountTypeNameDataGridViewTextBoxColumn.Visible = false;
                 *       createTimeDataGridViewTextBoxColumn.HeaderText = "收款日期";
                 *       accountMoneyDataGridViewTextBoxColumn.HeaderText = "收款金额";
                 *       SourceOrderID.Visible = true;
                 *       sourceOrderIDDataGridViewTextBoxColumn.Visible = false;
                 *       this.Text = "其他费用明细";
                 *       break;
                 *   case PARSQueryType.PayMoney:
                 *       accountTypeNameDataGridViewTextBoxColumn.Visible = true;
                 *       accountTypeNameDataGridViewTextBoxColumn.HeaderText = "收款类型";
                 *       createTimeDataGridViewTextBoxColumn.HeaderText = "收款日期";
                 *       accountMoneyDataGridViewTextBoxColumn.HeaderText = "收款金额";
                 *       SourceOrderID.Visible = true;
                 *       sourceOrderIDDataGridViewTextBoxColumn.Visible = false;
                 *       this.Text = "已收金额明细";
                 *       break;
                 *   default:
                 *       break;
                 * }*/
                this.ShowDialog();
            }
            catch (Exception ex)
            {
                CommonGlobalUtil.ShowError(ex);
            }
        }
Exemplo n.º 3
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 (e.ColumnIndex == inCountDataGridViewTextBoxColumn.Index || e.ColumnIndex == inMoneyDataGridViewTextBoxColumn.Index)
                {
                    //进货明细
                    try
                    {
                        if (CommonGlobalUtil.EngineUnconnectioned(this))
                        {
                            return;
                        }


                        StockgoodDetailForm           form       = new StockgoodDetailForm();
                        DataTable                     dt         = (DataTable)this.dataGridView1.DataSource;
                        DataRow                       item       = dt.Rows[e.RowIndex];
                        GetCostumeInvoicingDetailPara changePara = new GetCostumeInvoicingDetailPara();

                        ReflectionHelper.CopyProperty(this.pagePara, changePara);

                        changePara.CostumeID = item["CostumeID"].ToString();
                        if (skinCheckBoxColor.Checked)
                        {
                            changePara.ColorName = item["ColorName"].ToString();
                        }
                        if (skinCheckBoxSizeName.Checked)
                        {
                            changePara.SizeName = item["SizeName"].ToString();
                        }

                        changePara.StartDate = changePara.StartDate;
                        changePara.EndDate   = changePara.EndDate;
                        form.ShowDialog(changePara);
                    }
                    catch (Exception ex)
                    {
                        ShowError(ex);
                    }
                    finally
                    {
                        UnLockPage();
                    }
                }
                if (e.ColumnIndex == pfSalesCountDataGridViewTextBoxColumn.Index || e.ColumnIndex == pfSalesMoneyDataGridViewTextBoxColumn.Index)
                {
                    //批发明细
                    try
                    {
                        if (CommonGlobalUtil.EngineUnconnectioned(this))
                        {
                            return;
                        }

                        WholesaleDetailForm form = new WholesaleDetailForm();

                        DataTable dt   = (DataTable)this.dataGridView1.DataSource;
                        DataRow   item = dt.Rows[e.RowIndex];
                        GetCostumeInvoicingDetailPara changePara = new GetCostumeInvoicingDetailPara();
                        ReflectionHelper.CopyProperty(this.pagePara, changePara);

                        changePara.CostumeID = item["CostumeID"].ToString();
                        if (skinCheckBoxColor.Checked)
                        {
                            changePara.ColorName = item["ColorName"].ToString();
                        }
                        if (skinCheckBoxSizeName.Checked)
                        {
                            changePara.SizeName = item["SizeName"].ToString();
                        }
                        changePara.StartDate = changePara.StartDate;
                        changePara.EndDate   = changePara.EndDate;
                        form.ShowDialog(changePara);
                    }
                    catch (Exception ex)
                    {
                        ShowError(ex);
                    }
                    finally
                    {
                        UnLockPage();
                    }
                }
                if (e.ColumnIndex == retailCountDataGridViewTextBoxColumn.Index || e.ColumnIndex == retailMoneyDataGridViewTextBoxColumn.Index)
                {
                    //零售明细
                    try
                    {
                        if (CommonGlobalUtil.EngineUnconnectioned(this))
                        {
                            return;
                        }

                        sellDetailForm form = new sellDetailForm();
                        DataTable      dt   = (DataTable)this.dataGridView1.DataSource;
                        DataRow        item = dt.Rows[e.RowIndex];
                        GetCostumeInvoicingDetailPara changePara = new GetCostumeInvoicingDetailPara();
                        ReflectionHelper.CopyProperty(this.pagePara, changePara);
                        changePara.CostumeID = item["CostumeID"].ToString();
                        if (skinCheckBoxColor.Checked)
                        {
                            changePara.ColorName = item["ColorName"].ToString();
                        }
                        if (skinCheckBoxSizeName.Checked)
                        {
                            changePara.SizeName = item["SizeName"].ToString();
                        }
                        changePara.StartDate = changePara.StartDate;
                        changePara.EndDate   = changePara.EndDate;
                        form.ShowDialog(changePara);
                    }
                    catch (Exception ex)
                    {
                        ShowError(ex);
                    }
                    finally
                    {
                        UnLockPage();
                    }
                }
            }
            catch (Exception ee)
            {
                ShowError(ee);
            }
        }