Esempio n. 1
0
        //栏目四 栏目五     本次申请金额带动栏目五  累计申请金额的改变
        private void Column4Info_TextChanged(object sender, EventArgs e)
        {
            if (this.Column4Info.Text.Trim() == "")
            {
                this.Column5Info.Text = "";

                return;
            }
            //MessageBox.Show(this.Column4Info.Text.ToString(), "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);

            ///  modify by gatieme @2016-04-05 21:16
            ///  需求变动
            ///  会签单中累计申请额度,
            ///  从原来 当前部门当前小项目Project的累计申请额度
            ///  -=>
            ///  变更为 当前部门当前大类别Category的累计申请额度
            try
            {
                double currExpense = double.Parse(this.Column4Info.Text.ToString());
                //找到部门、工程名、年份  来确定本年的使用金额是多少
                Search search = new Search
                {
                    SDepartmentShortlCall = this.IdDepartShortCall.Text,
                    //ProjectId = Convert.ToInt32(this.xmName.SelectedValue),
                    CategoryShortCall = this.IdCategory.Text,
                    Year = int.Parse(this.IdYear.Text),
                };


                //double totlaExpense = _sc.StatisticDepartmentYearProjectExpense(search);
                double totlaExpense = _sc.StatisticDepartmentYearCategoryExpense(search);

                this.Column5Info.Text = (totlaExpense + currExpense).ToString();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }