コード例 #1
0
ファイル: MoreBudget.aspx.cs プロジェクト: zxl881203/src
    protected void btnSave_Click(object sender, System.EventArgs e)
    {
        if (BudgetManage_Cost_MoreBudget.organization)
        {
            OrganizationMonthBudget.DelAll(BudgetManage_Cost_MoreBudget.id);
            this.SaveDataToViewState();
            System.Collections.Generic.List <OrganizationMonthBudget> list = this.ViewState["Budget"] as System.Collections.Generic.List <OrganizationMonthBudget>;
            using (System.Collections.Generic.List <OrganizationMonthBudget> .Enumerator enumerator = list.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    OrganizationMonthBudget current = enumerator.Current;
                    current.Add(current);
                }
                goto IL_B7;
            }
        }
        IndirectMonthBudget.DelAll(BudgetManage_Cost_MoreBudget.id);
        this.SaveDataToViewState();
        System.Collections.Generic.List <IndirectMonthBudget> list2 = this.ViewState["Budget"] as System.Collections.Generic.List <IndirectMonthBudget>;
        foreach (IndirectMonthBudget current2 in list2)
        {
            current2.Add(current2);
        }
IL_B7:
        base.RegisterScript("top.ui.winSuccess();;");
    }
コード例 #2
0
ファイル: MoreBudget.aspx.cs プロジェクト: zxl881203/src
 protected void btnAdd_Click(object sender, System.EventArgs e)
 {
     if (BudgetManage_Cost_MoreBudget.organization)
     {
         System.Collections.Generic.List <OrganizationMonthBudget> list = new System.Collections.Generic.List <OrganizationMonthBudget>();
         if (this.ViewState["Budget"] != null)
         {
             this.SaveDataToViewState();
             list = (this.ViewState["Budget"] as System.Collections.Generic.List <OrganizationMonthBudget>);
         }
         OrganizationMonthBudget item = OrganizationMonthBudget.Create(System.Guid.NewGuid().ToString(), BudgetManage_Cost_MoreBudget.id, 0m, System.DateTime.Now.Year, System.DateTime.Now.Month);
         list.Add(item);
         if (list.Count > 1)
         {
             this.btnSave.Enabled = false;
         }
         else
         {
             this.btnSave.Enabled = true;
         }
         this.ViewState["Budget"] = list;
     }
     else
     {
         System.Collections.Generic.List <IndirectMonthBudget> list2 = new System.Collections.Generic.List <IndirectMonthBudget>();
         if (this.ViewState["Budget"] != null)
         {
             this.SaveDataToViewState();
             list2 = (this.ViewState["Budget"] as System.Collections.Generic.List <IndirectMonthBudget>);
         }
         IndirectMonthBudget item2 = IndirectMonthBudget.Create(System.Guid.NewGuid().ToString(), BudgetManage_Cost_MoreBudget.id, 0m, System.DateTime.Now.Year, System.DateTime.Now.Month);
         list2.Add(item2);
         if (list2.Count > 1)
         {
             this.btnSave.Enabled = false;
         }
         else
         {
             this.btnSave.Enabled = true;
         }
         this.ViewState["Budget"] = list2;
     }
     this.BindGV();
 }
コード例 #3
0
ファイル: MoreBudget.aspx.cs プロジェクト: zxl881203/src
 protected void BindGV()
 {
     if (this.ViewState["Budget"] == null)
     {
         if (BudgetManage_Cost_MoreBudget.organization)
         {
             System.Collections.Generic.List <OrganizationMonthBudget> all = OrganizationMonthBudget.GetAll(BudgetManage_Cost_MoreBudget.id);
             this.ViewState["Budget"] = all;
         }
         else
         {
             System.Collections.Generic.List <IndirectMonthBudget> all2 = IndirectMonthBudget.GetAll(BudgetManage_Cost_MoreBudget.id);
             all2 = IndirectMonthBudget.GetAll(BudgetManage_Cost_MoreBudget.id);
             this.ViewState["Budget"] = all2;
         }
     }
     this.gvBudget.DataSource = this.ViewState["Budget"];
     this.gvBudget.DataBind();
 }
コード例 #4
0
ファイル: MoreBudget.aspx.cs プロジェクト: zxl881203/src
 private bool RemoveSearch(OrganizationMonthBudget budget)
 {
     System.Collections.Generic.List <string> listFromJson = JsonHelper.GetListFromJson(this.hfldCheckedIds.Value);
     return(this.IsExist(budget.Id, listFromJson));
 }