コード例 #1
0
 public void BindGv()
 {
     if (this.year == "zzjg")
     {
         this.gvBudget.DataSource = OrganizationBudget.GetAllPass(this.prjId);
     }
     else
     {
         this.gvBudget.DataSource = IndirectBudget.GetAllPass(this.prjId);
     }
     this.gvBudget.DataBind();
 }
コード例 #2
0
ファイル: IndirectView.aspx.cs プロジェクト: zxl881203/src
 protected void Bind(string id)
 {
     try
     {
         new System.Guid(id);
         this.gvBudget.DataSource = IndirectBudget.GetAll(id);
     }
     catch
     {
         this.gvBudget.DataSource = OrganizationBudget.GetAll(id);
         this.lblPrjOrgName.Text  = "组织机构名称";
     }
     this.gvBudget.DataBind();
 }
コード例 #3
0
ファイル: IndirectView.aspx.cs プロジェクト: zxl881203/src
    protected void bindPrjOrgName(string relatedId)
    {
        DataTable wFInfo = IndirectBudget.GetWFInfo(relatedId);

        if (wFInfo != null && wFInfo.Rows.Count > 0)
        {
            DataRow dataRow = wFInfo.Rows[0];
            string  text    = dataRow["userName"].ToString();
            string  text2   = dataRow["Name"].ToString();
            string  text3   = System.Convert.ToDateTime(dataRow["InputDate"].ToString()).ToString("yyyy-MM-dd");
            this.lblRelatedName.Text = text2;
            this.lblInputDate.Text   = text3;
            this.lblInputUser.Text   = text;
        }
    }
コード例 #4
0
 protected void AddBudget(System.Collections.Generic.IDictionary <string, decimal> dicBudAmount, string prjId)
 {
     if (dicBudAmount.Count > 0)
     {
         foreach (string current in dicBudAmount.Keys)
         {
             string         id             = System.Guid.NewGuid().ToString();
             string         empty          = string.Empty;
             string         code           = current;
             decimal        num            = dicBudAmount[current];
             IndirectBudget indirectBudget = IndirectBudget.Create(id, prjId, code, num, num, BudgetManage_Cost_IndirectBudget.inputUser, System.DateTime.Now, empty);
             indirectBudget.Add(indirectBudget);
         }
     }
 }
コード例 #5
0
    protected void setWF()
    {
        int flowState = IndirectBudget.GetFlowState(this.prjId);

        this.hfldFlowState.Value = flowState.ToString();
        string text = System.Guid.NewGuid().ToString();

        if (flowState != -1)
        {
            text = IndirectBudget.GetGuid(this.prjId);
        }
        this.hfldGuid.Value  = text;
        this.lblWFState.Text = Common2.GetState(flowState.ToString());
        System.Text.StringBuilder stringBuilder = new System.Text.StringBuilder();
        if (this.year == "zzjg")
        {
            stringBuilder.Append(string.Concat(new object[]
            {
                "setWFButtonState('",
                text,
                "', '', '",
                flowState,
                "', true);"
            }));
        }
        else
        {
            stringBuilder.Append(string.Concat(new object[]
            {
                "setWFButtonState('",
                text,
                "', '",
                this.prjId,
                "', '",
                flowState,
                "', true);"
            }));
        }
        if (flowState != -1 && flowState != -3 && base.UserCode != "00000000")
        {
            stringBuilder.Append("$('input[type=\"text\"]').each(function (i) { $(this).attr('disabled', 'disabled');});$('#btnSave').attr('disabled','disabled');");
        }
        if (this.year == "zzjg")
        {
            this.WF1.BusiCode = "124";
        }
        base.RegisterScript(stringBuilder.ToString());
    }
コード例 #6
0
ファイル: CommonBLL.cs プロジェクト: wolay/BudgetCaptureNgc
 public static bool AddIndirectExpense(IndirectBudget astBud)
 {
     try
     {
         using (BudgetCaptureDBEntities db = new BudgetCaptureDBEntities())
         {
             db.IndirectBudgets.Add(astBud);
             db.SaveChanges();
             return(true);
         }
     }
     catch (Exception ex)
     {
         // Utility.WriteError("Error Msg: " + ex.Message);
         throw ex;
     }
 }
コード例 #7
0
ファイル: CommonBLL.cs プロジェクト: wolay/BudgetCaptureNgc
 public static bool DeleteIndirectExpense(IndirectBudget astBud)
 {
     try
     {
         bool rst = false;
         using (var db = new BudgetCaptureDBEntities())
         {
             db.Entry(astBud).State = System.Data.Entity.EntityState.Deleted;
             db.SaveChanges();
             rst = true;
         }
         return(rst);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #8
0
ファイル: IndirectVerify.aspx.cs プロジェクト: zxl881203/src
 protected void DelDesktopNotifi()
 {
     if (this.ddlYear.SelectedValue == "zzjg")
     {
         if (!OrganizationBudget.isHaveEReport(this.tvBudget.SelectedValue))
         {
             OrganizationBudget.AddOrDelDesktopNotifications(this.tvBudget.SelectedValue, false);
             return;
         }
     }
     else
     {
         if (!IndirectBudget.isHaveEReport(this.tvBudget.SelectedValue))
         {
             IndirectBudget.AddOrDelDesktopNotifications(this.tvBudget.SelectedValue, false);
         }
     }
 }
コード例 #9
0
ファイル: CommonBLL.cs プロジェクト: wolay/BudgetCaptureNgc
 public static bool UpdateIndirectExpense(IndirectBudget astBud)
 {
     try
     {
         bool rst = false;
         using (var db = new BudgetCaptureDBEntities())
         {
             db.IndirectBudgets.Attach(astBud);
             db.Entry(astBud).State = System.Data.Entity.EntityState.Modified;
             db.SaveChanges();
             rst = true;
         }
         return(rst);
     }
     catch (Exception ex)
     {
         // Utility.WriteError("Error Msg: " + ex.Message);
         throw ex;
     }
 }
コード例 #10
0
 public void BindGv()
 {
     this.setWF();
     if (string.IsNullOrEmpty(this.prjId))
     {
         this.btnSave.Enabled = false;
     }
     this.hfldPrjId.Value     = this.prjId;
     this.hfldInputUser.Value = base.UserCode;
     if (this.year == "zzjg")
     {
         this.gvBudget.DataSource = OrganizationBudget.GetAll(this.prjId);
     }
     else
     {
         this.gvBudget.DataSource = IndirectBudget.GetAll(this.prjId);
     }
     this.gvBudget.DataBind();
     base.RegisterScript("keyPress()");
 }
コード例 #11
0
 protected void UpdateBudget(System.Collections.Generic.IDictionary <string, decimal> dicBudAmount, string prjId)
 {
     if (dicBudAmount.Count > 0)
     {
         foreach (string current in dicBudAmount.Keys)
         {
             string         text = current;
             decimal        num  = dicBudAmount[current];
             IndirectBudget byPrjIdAndCBSCode = IndirectBudget.GetByPrjIdAndCBSCode(prjId, text);
             if (byPrjIdAndCBSCode != null)
             {
                 byPrjIdAndCBSCode.AccountAmount = num;
                 byPrjIdAndCBSCode.Update(byPrjIdAndCBSCode);
             }
             else
             {
                 IndirectBudget indirectBudget = IndirectBudget.Create(System.Guid.NewGuid().ToString(), prjId, text, num, num, BudgetManage_Cost_IndirectBudget.inputUser, System.DateTime.Now, string.Empty);
                 indirectBudget.Add(indirectBudget);
             }
         }
     }
 }
コード例 #12
0
 protected void BindGV()
 {
     this.gvBudget.DataSource = IndirectBudget.GetAllReport(base.Request["id"]);
     this.gvBudget.DataBind();
 }