Exemplo n.º 1
0
 private void aisinoDataGrid1_DataGridRowSelectionChanged(object sender, DataGridRowEventArgs e)
 {
     try
     {
         this.Grid1BH = e.get_CurrentRow().Cells["BH"].Value.ToString().Trim();
         this.dataSet = this.djcfBLL.QueryXSDJMX(this.Grid1BH, this.djcfBLL.Pagesize, 1);
         this.aisinoDataGrid2.set_DataSource(this.dataSet);
         SaleBill bill  = this.billBL.Find(this.Grid1BH);
         int      count = this.aisinoDataGrid2.get_Rows().Count;
         for (int i = 0; i < count; i++)
         {
             string str  = this.aisinoDataGrid2.get_Rows()[i].Cells["SLV"].Value.ToString();
             string str2 = this.aisinoDataGrid2.get_Rows()[i].Cells["XH"].Value.ToString();
             if (((str != null) && (str != "")) && (str != "中外合作油气田"))
             {
                 string str3 = this.billBL.ShowSLV(bill, str2, str);
                 if (str3 != "")
                 {
                     this.aisinoDataGrid2.get_Rows()[i].Cells["SLV"].Value = str3;
                 }
             }
         }
     }
     catch (Exception exception)
     {
         HandleException.HandleError(exception);
     }
 }
Exemplo n.º 2
0
 private void aisinoDataGrid1_DataGridRowSelectionChanged(object sender, DataGridRowEventArgs e)
 {
     try
     {
         this.Grid1BH = e.get_CurrentRow().Cells["BH"].Value.ToString().Trim();
         this.aisinoDataGrid2.set_DataSource(this.fptkBLL.QueryXSDJMX(this.Grid1BH, this.fptkBLL.Pagesize, 1));
         for (int i = 0; i < this.aisinoDataGrid2.get_Rows().Count; i++)
         {
             string str = this.aisinoDataGrid2.get_Rows()[i].Cells["SLV"].Value.ToString();
             if ((((str != null) && (str != "")) && (str != "免税")) && (str != "中外合作油气田"))
             {
                 str = ((Convert.ToDouble(str) * 100.0)).ToString() + "%";
                 this.aisinoDataGrid2.get_Rows()[i].Cells["SLV"].Value = str;
             }
         }
     }
     catch (Exception exception)
     {
         if (exception.ToString().Contains("超时"))
         {
             this.log.Error(exception.ToString());
         }
         else
         {
             HandleException.HandleError(exception);
         }
     }
 }
Exemplo n.º 3
0
 private void aisinoDataGrid3_DataGridRowClickEvent(object sender, DataGridRowEventArgs e)
 {
     try
     {
         string        str2;
         AisinoDataSet set;
         this.OriginalBH = e.get_CurrentRow().Cells["YSBH"].Value.ToString();
         if (this.OriginalBH.Substring(this.OriginalBH.Length - 2) == "~0")
         {
             str2 = e.get_CurrentRow().Cells["BH"].Value.ToString();
             set  = this.djhyBLL.GetYSDJMX(str2, this.djhyBLL.Pagesize, this.djhyBLL.CurrentPage);
             this.aisinoDataGrid4.set_DataSource(set);
         }
         else
         {
             str2 = e.get_CurrentRow().Cells["BH"].Value.ToString();
             set  = this.djhyBLL.GetYSDJMX(str2, this.djhyBLL.Pagesize, this.djhyBLL.CurrentPage);
             this.aisinoDataGrid4.set_DataSource(set);
         }
         SaleBill bill  = this.billBL.Find(this.OriginalBH);
         int      count = this.aisinoDataGrid4.get_Rows().Count;
         for (int i = 0; i < count; i++)
         {
             string str3 = this.aisinoDataGrid4.get_Rows()[i].Cells["SLV"].Value.ToString();
             string str4 = this.aisinoDataGrid4.get_Rows()[i].Cells["XH"].Value.ToString();
             if (((str3 != null) && (str3 != "")) && (str3 != "中外合作油气田"))
             {
                 string str5 = this.billBL.ShowSLV(bill, str4, str3);
                 if (str5 != "")
                 {
                     this.aisinoDataGrid4.get_Rows()[i].Cells["SLV"].Value = str5;
                 }
             }
         }
     }
     catch (Exception exception)
     {
         HandleException.HandleError(exception);
     }
 }
Exemplo n.º 4
0
 private void aisinoDataGrid1_DataGridRowClickEvent(object sender, DataGridRowEventArgs e)
 {
     try
     {
         int    num2;
         string str;
         string str2;
         string str3;
         this.CurrentBH = e.get_CurrentRow().Cells["BH"].Value.ToString();
         this.aisinoDataGrid2.set_DataSource(this.djhyBLL.GetDJMX(this.CurrentBH, this.djhyBLL.Pagesize, this.djhyBLL.CurrentPage));
         this.aisinoDataGrid3.set_DataSource(this.djhyBLL.GetYSDJ(this.CurrentBH, this.djhyBLL.Pagesize, this.djhyBLL.CurrentPage));
         this.OriginalBH = this.aisinoDataGrid3.get_Rows()[0].Cells["BH"].Value.ToString();
         this.aisinoDataGrid4.set_DataSource(this.djhyBLL.GetYSDJMX(this.OriginalBH, this.djhyBLL.Pagesize, this.djhyBLL.CurrentPage));
         SaleBill bill  = this.billBL.Find(this.CurrentBH);
         int      count = this.aisinoDataGrid2.get_Rows().Count;
         for (num2 = 0; num2 < count; num2++)
         {
             str  = this.aisinoDataGrid2.get_Rows()[num2].Cells["SLV"].Value.ToString();
             str2 = this.aisinoDataGrid2.get_Rows()[num2].Cells["XH"].Value.ToString();
             if (((str != null) && (str != "")) && (str != "中外合作油气田"))
             {
                 str3 = this.billBL.ShowSLV(bill, str2, str);
                 if (str3 != "")
                 {
                     this.aisinoDataGrid2.get_Rows()[num2].Cells["SLV"].Value = str3;
                 }
             }
         }
         this.OriginalBH = this.aisinoDataGrid3.get_Rows()[0].Cells["YSBH"].Value.ToString();
         SaleBill bill2 = this.billBL.Find(this.OriginalBH);
         int      num3  = this.aisinoDataGrid4.get_Rows().Count;
         for (num2 = 0; num2 < num3; num2++)
         {
             str  = this.aisinoDataGrid4.get_Rows()[num2].Cells["SLV"].Value.ToString();
             str2 = this.aisinoDataGrid4.get_Rows()[num2].Cells["XH"].Value.ToString();
             if (((str != null) && (str != "")) && (str != "中外合作油气田"))
             {
                 str3 = this.billBL.ShowSLV(bill2, str2, str);
                 if (str3 != "")
                 {
                     this.aisinoDataGrid4.get_Rows()[num2].Cells["SLV"].Value = str3;
                 }
             }
         }
     }
     catch (Exception exception)
     {
         HandleException.HandleError(exception);
     }
 }
Exemplo n.º 5
0
        private void aisinoDataGrid1_DataGridRowSelectionChanged(object sender, DataGridRowEventArgs e)
        {
            SaleBill bill = null;
            int      num3;
            string   xSDJBH = e.get_CurrentRow().Cells["BH"].Value.ToString().Trim();

            this.aisinoDataGrid2.set_DataSource(this.djhbBLL.QueryXSDJMX(xSDJBH));
            double round = 0.0;
            double num2  = 0.0;

            for (num3 = 0; num3 < this.aisinoDataGrid1.get_Rows().Count; num3++)
            {
                xSDJBH = this.aisinoDataGrid1.get_Rows()[num3].Cells["BH"].Value.ToString().Trim();
                if (this.aisinoDataGrid1.get_Rows()[num3].Selected)
                {
                    bill   = this.billBL.Find(xSDJBH);
                    round += bill.JEHJ;
                    foreach (Goods goods in bill.ListGoods)
                    {
                        num2 += goods.SE;
                    }
                }
            }
            int count = this.aisinoDataGrid2.get_Rows().Count;

            for (num3 = 0; num3 < count; num3++)
            {
                string str2 = this.aisinoDataGrid2.get_Rows()[num3].Cells["SLV"].Value.ToString();
                string str3 = this.aisinoDataGrid2.get_Rows()[num3].Cells["XH"].Value.ToString();
                if (((str2 != null) && (str2 != "")) && (str2 != "中外合作油气田"))
                {
                    string str4 = this.billBL.ShowSLV(bill, str3, str2);
                    if (str4 != "")
                    {
                        this.aisinoDataGrid2.get_Rows()[num3].Cells["SLV"].Value = str4;
                    }
                }
            }
            round             = SaleBillCtrl.GetRound(round, 2);
            num2              = SaleBillCtrl.GetRound(num2, 2);
            this.labHBJE.Text = "合计金额 " + round.ToString("0.00");
            this.labHBSE.Text = "合计税额 " + num2.ToString("0.00");
        }
Exemplo n.º 6
0
 private void aisinoDataGrid1_DataGridRowClickEvent(object sender, DataGridRowEventArgs e)
 {
     try
     {
         this.SelectedBH = e.get_CurrentRow().Cells["BH"].Value.ToString().Trim();
         this.aisinoDataGrid2.set_DataSource(this.hzBLL.QueryXSDJMX(this.SelectedBH, this.hzBLL.Pagesize, this.hzBLL.CurrentPage));
         this.bill = this.billBL.Find(this.SelectedBH);
         int count = this.aisinoDataGrid2.get_Rows().Count;
         for (int i = 0; i < count; i++)
         {
             string str  = this.aisinoDataGrid2.get_Rows()[i].Cells["SLV"].Value.ToString();
             string str2 = this.aisinoDataGrid2.get_Rows()[i].Cells["XH"].Value.ToString();
             if (((str != null) && (str != "")) && (str != "中外合作油气田"))
             {
                 string str3 = this.billBL.ShowSLV(this.bill, str2, str);
                 if (str3 != "")
                 {
                     this.aisinoDataGrid2.get_Rows()[i].Cells["SLV"].Value = str3;
                 }
             }
         }
         string str4 = this.billBL.CollectDiscount(this.bill);
         if (str4 == "0")
         {
             this.DisplayZKHZH();
         }
         else
         {
             this.aisinoDataGrid3.set_DataSource(this.hzBLL.QueryXSDJMX("NoExist", this.hzBLL.Pagesize, 1));
             HandleException.Log.Error("该单据不可以进行折扣汇总:" + str4);
             MessageBoxHelper.Show(str4);
         }
     }
     catch (Exception exception)
     {
         HandleException.HandleError(exception);
     }
 }
Exemplo n.º 7
0
        private void aisinoDataGrid1_DataGridRowClickEvent(object sender, DataGridRowEventArgs e)
        {
            int count = this.aisinoDataGrid1.get_SelectedRows().Count;

            if (count > this.yuanseleCount)
            {
                e.get_CurrentRow().Cells["DJZT"].Value = count.ToString();
            }
            else
            {
                int num3;
                if (count < this.yuanseleCount)
                {
                    object obj2   = e.get_CurrentRow().Cells["DJZT"].Value;
                    int    result = 1;
                    if ((obj2 != null) && (obj2.ToString().Trim() != ""))
                    {
                        int.TryParse(obj2.ToString().Trim(), out result);
                    }
                    for (num3 = 0; num3 < this.aisinoDataGrid1.get_Rows().Count; num3++)
                    {
                        object obj3 = this.aisinoDataGrid1.get_Rows()[num3].Cells["DJZT"].Value;
                        if ((obj3 != null) && (obj3.ToString().Trim() != ""))
                        {
                            if (this.aisinoDataGrid1.get_Rows()[num3].Selected)
                            {
                                if (Convert.ToInt32(obj3) > result)
                                {
                                    this.aisinoDataGrid1.get_Rows()[num3].Cells["DJZT"].Value = Convert.ToInt32(obj3) - 1;
                                }
                                else if (Convert.ToInt32(obj3) == result)
                                {
                                    this.aisinoDataGrid1.get_Rows()[num3].Cells["DJZT"].Value = count.ToString();
                                }
                            }
                            else
                            {
                                this.aisinoDataGrid1.get_Rows()[num3].Cells["DJZT"].Value = "";
                            }
                        }
                        else if (this.aisinoDataGrid1.get_Rows()[num3].Selected)
                        {
                            this.aisinoDataGrid1.get_Rows()[num3].Cells["DJZT"].Value = count.ToString();
                        }
                        else
                        {
                            this.aisinoDataGrid1.get_Rows()[num3].Cells["DJZT"].Value = "";
                        }
                    }
                }
                else
                {
                    for (num3 = 0; num3 < this.aisinoDataGrid1.get_Rows().Count; num3++)
                    {
                        if (this.aisinoDataGrid1.get_Rows()[num3].Selected)
                        {
                            this.aisinoDataGrid1.get_Rows()[num3].Cells["DJZT"].Value = "1";
                        }
                        else
                        {
                            this.aisinoDataGrid1.get_Rows()[num3].Cells["DJZT"].Value = "";
                        }
                    }
                }
            }
            this.yuanseleCount = count;
        }