예제 #1
0
        private void DropDownList0_TextChanged_Extend(object sender, EventArgs e)
        {
            UFIDA.U9.Cust.GS.FI.OperatorBonusBP.Proxy.SelectOperatorBonusProxy proxy = new OperatorBonusBP.Proxy.SelectOperatorBonusProxy();
            int calculateParams = Convert.ToInt32(Context.Request.QueryString["CalculateBonus"]);

            proxy.Type = calculateParams;
            proxy.Year = Convert.ToInt32(this.DropDownList0.SelectedValue);
            //返回值
            BonusRecordDTOData recordDto = proxy.Do();//

            this.Model.CalculateProductBonusView.Clear();
            if (recordDto != null)
            {
                List <int> listYear = recordDto.ListYear;
                List <BonusCalculateRecordBE.BonusCalculateRecordDTOData> listCalulate = recordDto.BonusCalculateRecord;
                //foreach (int year in listYear)
                //{
                //    this.DropDownList0.AddItem(year + "", year + "");
                //}
                //if (DropDownList0.Items.Count > 0)
                //    DropDownList0.SelectedValue = DateTime.Now.Year.ToString();
                //加载行
                int i = 0;
                foreach (BonusCalculateRecordDTOData calulate in listCalulate)
                {
                    CalculateProductBonusViewRecord record = null;
                    if (i == 0 && this.Model.CalculateProductBonusView.FocusedRecord != null)
                    {
                        record = this.Model.CalculateProductBonusView.FocusedRecord;
                    }
                    else
                    {
                        record = this.Model.CalculateProductBonusView.AddNewUIRecord();
                    }
                    record.ID                 = calulate.ID;
                    record.AccountPeriod      = calulate.SOBAccountingPeriod.ID;
                    record.AccountPeriod_Code = calulate.SOBAccountingPeriod.Code;
                    record.AccountPeriod_Name = calulate.SOBAccountingPeriod.DisplayName;
                    record.PeriodStatus       = calulate.PeriodStatus;
                    record.Operetor           = calulate.Oprator;
                    if (calulate.OprateTime != null)
                    {
                        record.OperatorDate = calulate.OprateTime;
                    }
                    i++;
                }
            }
            DropDownList0_TextChanged_DefaultImpl(sender, e);
        }
예제 #2
0
        public void BeforeUIModelBinding()
        {
            //if (this.DropDownList0.Items.Count <= 0)
            //{
            //    this.DropDownList0.AddItem("2012", "0");
            //    this.DropDownList0.AddItem("2013", "1");
            //    this.DropDownList0.AddItem("2014", "2");
            //    CalculateProductBonusViewRecord record = null;
            //    if (this.Model.CalculateProductBonusView.FocusedRecord == null)
            //        record = this.Model.CalculateProductBonusView.AddNewUIRecord();
            //    else
            //        record = this.Model.CalculateProductBonusView.FocusedRecord;
            //    record.ID = 1001411210040614;
            //    record.AccountPeriod = 1001411210040614;
            //    record.AccountPeriod_Code = "2014-01";
            //    record.AccountPeriod_Name = "2014-01";
            //    record.PeriodStatus = 0;
            //    record.Operetor = "";

            //    record = this.Model.CalculateProductBonusView.AddNewUIRecord();
            //    record.ID = 1001411210040615;
            //    record.AccountPeriod = 1001411210040615;
            //    record.AccountPeriod_Code = "2014-02";
            //    record.AccountPeriod_Name = "2014-02";
            //    record.PeriodStatus = 0;
            //    record.Operetor = "";
            //}
            #region 加载会计年度
            if (this.DropDownList0.Items.Count <= 0)
            {
                //this.DropDownList0.AddItem("2012", "0");
                //this.DropDownList0.AddItem("2013", "1");
                //this.DropDownList0.AddItem("2014", "2");
                UFIDA.U9.Cust.GS.FI.OperatorBonusBP.Proxy.SelectOperatorBonusProxy proxy = new OperatorBonusBP.Proxy.SelectOperatorBonusProxy();
                //if (System.Web.HttpContext.Current == null)
                //{
                //    string text = System.Web.HttpContext.Current.Server.MapPath("~/") ;
                //}
                int calculateParams = Convert.ToInt32(Context.Request.QueryString["CalculateBonus"]);
                proxy.Type = calculateParams;
                proxy.Year = DateTime.Now.Year;
                //返回值
                BonusRecordDTOData recordDto = proxy.Do();//
                if (recordDto != null)
                {
                    List <int> listYear = recordDto.ListYear;
                    List <BonusCalculateRecordBE.BonusCalculateRecordDTOData> listCalulate = recordDto.BonusCalculateRecord;
                    foreach (int year in listYear)
                    {
                        this.DropDownList0.AddItem(year + "", year + "");
                    }
                    if (DropDownList0.Items.Count > 0)
                    {
                        DropDownList0.SelectedValue = DateTime.Now.Year.ToString();
                    }
                    //加载行
                    int i = 0;
                    foreach (BonusCalculateRecordDTOData calulate in listCalulate)
                    {
                        CalculateProductBonusViewRecord record = null;
                        if (i == 0 && this.Model.CalculateProductBonusView.FocusedRecord != null)
                        {
                            record = this.Model.CalculateProductBonusView.FocusedRecord;
                        }
                        else
                        {
                            record = this.Model.CalculateProductBonusView.AddNewUIRecord();
                        }
                        record.ID                 = calulate.ID;
                        record.AccountPeriod      = calulate.SOBAccountingPeriod.ID;
                        record.AccountPeriod_Code = calulate.SOBAccountingPeriod.Code;
                        record.AccountPeriod_Name = calulate.SOBAccountingPeriod.DisplayName;
                        record.PeriodStatus       = calulate.PeriodStatus;
                        record.Operetor           = calulate.Oprator;
                        if (calulate.OprateTime != null)
                        {
                            record.OperatorDate = calulate.OprateTime;
                        }
                        i++;
                    }
                }
            }
            #endregion
        }
예제 #3
0
        private void TextLoad()
        {
            UFIDA.U9.Cust.GS.FI.OperatorBonusBP.Proxy.SelectOperatorBonusProxy proxy = new OperatorBonusBP.Proxy.SelectOperatorBonusProxy();
            int calculateParams = Convert.ToInt32(Context.Request.QueryString["CalculateBonus"]);

            proxy.Type = calculateParams;
            proxy.Year = DateTime.Now.Year;
            //返回值
            BonusRecordDTOData recordDto = proxy.Do();//

            if (this.DropDownList0.Items.Count <= 0)
            {
                this.DropDownList0.AddItem("2012", "0");
                this.DropDownList0.AddItem("2013", "1");
                this.DropDownList0.AddItem("2014", "2");
                CalculateProductBonusViewRecord record = null;
                if (this.Model.CalculateProductBonusView.FocusedRecord == null)
                {
                    record = this.Model.CalculateProductBonusView.AddNewUIRecord();
                }
                else
                {
                    record = this.Model.CalculateProductBonusView.FocusedRecord;
                }
                record.ID                 = 1001411210040614;
                record.AccountPeriod      = 1001411210040614;
                record.AccountPeriod_Code = "2014-01";
                record.AccountPeriod_Name = "2014-01";
                record.PeriodStatus       = 0;
                record.Operetor           = "";

                record                    = this.Model.CalculateProductBonusView.AddNewUIRecord();
                record.ID                 = 1001411210040615;
                record.AccountPeriod      = 1001411210040615;
                record.AccountPeriod_Code = "2014-02";
                record.AccountPeriod_Name = "2014-02";
                record.PeriodStatus       = 0;
                record.Operetor           = "";

                if (recordDto != null)
                {
                    List <int> listYear = recordDto.ListYear;
                    List <UFIDA.U9.Cust.GS.FI.BonusCalculateRecordBE.BonusCalculateRecordDTOData> listCalulate = recordDto.BonusCalculateRecord;
                    foreach (int year in listYear)
                    {
                        this.DropDownList0.AddItem(year + "", year + "");
                    }
                    if (DropDownList0.Items.Count > 0)
                    {
                        DropDownList0.SelectedValue = DateTime.Now.Year.ToString();
                    }

                    //加载行
                    int i = 0;
                    //CalculateProductBonusViewRecord record = null;
                    record = null;
                    foreach (UFIDA.U9.Cust.GS.FI.BonusCalculateRecordBE.BonusCalculateRecordDTOData calulate in listCalulate)
                    {
                        //if (i == 0 && this.Model.CalculateProductBonusView.FocusedRecord != null)
                        //    record = this.Model.CalculateProductBonusView.FocusedRecord;
                        //else
                        //    record = this.Model.CalculateProductBonusView.AddNewUIRecord();
                        record = this.Model.CalculateProductBonusView.AddNewUIRecord();
                        //record.ID = calulate.ID;
                        record.AccountPeriod      = calulate.SOBAccountingPeriod.ID;
                        record.AccountPeriod_Code = calulate.SOBAccountingPeriod.Code;
                        record.AccountPeriod_Name = calulate.SOBAccountingPeriod.DisplayName;
                        record.PeriodStatus       = calulate.PeriodStatus;
                        record.Operetor           = calulate.Oprator;
                        if (calulate.OprateTime != null)
                        {
                            record.OperatorDate = calulate.OprateTime;
                        }
                        //record.IsSelected = false;
                        i++;
                    }
                }
            }
        }