Exemple #1
0
 private void ToInitialize()
 {
     if (this._Ic != "" && this._Ic.Length == 36)
     {
         AccounModel  accounModel  = new AccounModel();
         AccountLogic accountLogic = new AccountLogic();
         accounModel = accountLogic.GetModel(this._ic);
         if (accounModel != null)
         {
             this.txtaccountNum.Value = accounModel.accountNum;
             this.txtacountName.Value = accounModel.acountName;
             string   text  = "";
             string[] array = accounModel.authorizer.ToString().Split(new char[]
             {
                 ','
             });
             string[] array2 = array;
             for (int i = 0; i < array2.Length; i++)
             {
                 string text2 = array2[i];
                 if (text2 != "")
                 {
                     text = text + "," + text2;
                 }
             }
             string userName = this.am.GetUserName(text);
             this.Session["HumanCode"] = text;
             this.Session["HumanName"] = userName;
             this.txtauthorizer.Value  = userName;
             this.txtRemark.Value      = accounModel.Remark;
             this.txtinitialFund.Value = accounModel.initialFund.ToString();
         }
     }
 }
Exemple #2
0
    private string setSeesionval(string accid)
    {
        this.Session["HumanCodeOld"] = "";
        AccounModel model = this.AL.GetModel(accid);

        if (model != null)
        {
            string   text  = "";
            string[] array = model.authorizer.ToString().Split(new char[]
            {
                ','
            });
            string[] array2 = array;
            for (int i = 0; i < array2.Length; i++)
            {
                string text2 = array2[i];
                if (text2 != "")
                {
                    text = text + "," + text2;
                }
            }
            string userName = this.am.GetUserName(text);
            this.Session["HumanCode"]    = text;
            this.Session["HumanCodeOld"] = text;
            this.Session["HumanName"]    = userName;
            return("true");
        }
        return("false");
    }
Exemple #3
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        AccounModel accounModel = new AccounModel();
        bool        flag        = false;

        if (this._Action == "add")
        {
            accounModel = this.getModel();
            if (!this.bll.Exists(accounModel.accountNum.ToString(), accounModel.AccountID))
            {
                if (this.bll.Add(accounModel) > 0)
                {
                    flag = true;
                }
            }
            else
            {
                flag = false;
            }
        }
        else
        {
            if (this._Action == "edit")
            {
                accounModel = this.getModel();
                flag        = (!this.bll.Exists(accounModel.accountNum.ToString(), accounModel.AccountID) && this.bll.Update(accounModel));
            }
        }
        if (flag)
        {
            base.RegisterScript("top.ui.tabSuccess({ parentName: '_prjaccount' })");
            return;
        }
        base.RegisterScript("top.ui.alert('项目账户编号不允许重复,数据保存失败');");
    }
Exemple #4
0
    private AccounModel getModel()
    {
        AccounModel accounModel = new AccounModel();

        if (this._Action == "add")
        {
            accounModel.AccountID  = new Guid(this.hdnAccount.Value);
            accounModel.creatDate  = new DateTime?(DateTime.Now);
            accounModel.createMan  = base.UserCode;
            accounModel.authorizer = this.hdnUser.Value.ToString();
        }
        else
        {
            if (this._Action == "edit")
            {
                accounModel.AccountID = new Guid(this._Ic);
            }
        }
        accounModel.PrjGuid    = this.convPrjCode(this.hdnProjectCode.Value);
        accounModel.accountNum = this.txtaccountNum.Text.Trim();
        accounModel.acountName = this.txtacountName.Text.Trim();
        accounModel.Remark     = this.txtRemark.Value;
        if (this.txtinitialFund.Text != "")
        {
            accounModel.initialFund = new decimal?(decimal.Parse(this.txtinitialFund.Text));
        }
        else
        {
            accounModel.initialFund = new decimal?(0m);
        }
        return(accounModel);
    }
Exemple #5
0
    private AccounModel getModel()
    {
        AccounModel accounModel = new AccounModel();

        if (this._Action == "add")
        {
            accounModel.AccountID = new Guid(this.FileLink1.FID.ToString());
            accounModel.creatDate = new DateTime?(DateTime.Now);
            accounModel.createMan = this.Session["yhdm"].ToString();
            if (!string.IsNullOrEmpty(this._PrjCode))
            {
                accounModel.PrjGuid = this._PrjCode;
            }
        }
        else
        {
            if (this._Action == "edit")
            {
                accounModel.AccountID = new Guid(this._Ic);
            }
        }
        accounModel.accountNum = this.txtaccountNum.Value;
        accounModel.acountName = this.txtacountName.Value;
        string text = "";

        string[] array = this.Session["HumanCode"].ToString().Split(new char[]
        {
            ','
        });
        string[] array2 = array;
        for (int i = 0; i < array2.Length; i++)
        {
            string text2 = array2[i];
            if (text2 != "")
            {
                text = text + "," + text2;
            }
        }
        accounModel.authorizer = text;
        accounModel.Remark     = this.txtRemark.Value;
        if (this.txtinitialFund.Value != "")
        {
            accounModel.initialFund = new decimal?(decimal.Parse(this.txtinitialFund.Value));
        }
        else
        {
            accounModel.initialFund = new decimal?(0m);
        }
        return(accounModel);
    }
Exemple #6
0
    public DataTable GetTab()
    {
        string text = " and  PrjGuid in (select [PrjGuid] FROM [PT_PrjInfo] where  [Podepom] like '%" + base.UserCode + "%' ) ";

        if (!string.IsNullOrEmpty(this.txtPrjName.Text.Trim()))
        {
            text = text + " and prjname like '%" + this.txtPrjName.Text.Trim() + "%' ";
        }
        if (this.txtStartTime.Text.Trim().ToString() != "")
        {
            text = text + " and getdate >='" + this.txtStartTime.Text.Trim().ToString() + "' ";
        }
        if (this.txtEndTime.Text.Trim().ToString() != "")
        {
            text = text + " and getdate <='" + this.txtEndTime.Text.Trim().ToString() + "' ";
        }
        if (this.ddlSubject.SelectedValue != "-1")
        {
            text = text + " and Subject='" + this.ddlSubject.SelectedItem.Text.Trim().ToString() + "' ";
        }
        if (this.hdfAccoun.Value.Trim().ToString() != "")
        {
            AccounModel  accounModel  = new AccounModel();
            AccountLogic accountLogic = new AccountLogic();
            accounModel = accountLogic.GetModel(this.hdfAccoun.Value.ToString());
            string str;
            if (accounModel.PrjGuid.StartsWith("'"))
            {
                str = accounModel.PrjGuid.ToString();
            }
            else
            {
                str = "'" + accounModel.PrjGuid.ToString() + "'";
            }
            text = text + " and PrjGuid in (" + str + ")";
        }
        text += " and FlowState='1' ";
        text += " order by getdate desc ";
        DataTable list = this.incomebll.GetList(text);

        for (int i = 0; i < list.Rows.Count; i++)
        {
            this.inmoney += Convert.ToDecimal(list.Rows[i]["Inmoney"].ToString());
        }
        return(list);
    }
Exemple #7
0
 private void ToInitialize()
 {
     if (this._Ic != "" && this._Ic.Length == 36)
     {
         AccounModel accounModel = new AccounModel();
         accounModel = this.bll.GetModel(this._ic);
         if (accounModel != null)
         {
             this.hdnAccount.Value     = accounModel.AccountID.ToString();
             this.hdnUser.Value        = accounModel.authorizer.ToString();
             this.txtaccountNum.Text   = accounModel.accountNum;
             this.txtacountName.Text   = accounModel.acountName;
             this.txtRemark.Value      = accounModel.Remark;
             this.txtinitialFund.Text  = accounModel.initialFund.ToString();
             this.txtPrjName.Text      = this.bll.getPrjName(accounModel.PrjGuid);
             this.hdnProjectCode.Value = accounModel.PrjGuid;
         }
     }
 }
Exemple #8
0
    public DataTable GetTab()
    {
        string text = " and  PrjGuid in (select [PrjGuid] FROM [PT_PrjInfo] where  [Podepom] like '%" + base.UserCode + "%' ) ";

        if (!string.IsNullOrEmpty(this.txtPrjName.Text))
        {
            text = text + " and PrjName like '%" + this.txtPrjName.Text.Trim() + "%' ";
        }
        if (!string.IsNullOrEmpty(this.txtStartTime.Text.Trim()))
        {
            text = text + " and PayTime >='" + this.txtStartTime.Text.Trim() + "' ";
        }
        if (!string.IsNullOrEmpty(this.txtEndTime.Text))
        {
            text = text + " and PayTime <='" + this.txtEndTime.Text.Trim() + "' ";
        }
        if (!string.IsNullOrEmpty(this.hdfAccoun.Value))
        {
            AccounModel  accounModel  = new AccounModel();
            AccountLogic accountLogic = new AccountLogic();
            accounModel = accountLogic.GetModel(this.hdfAccoun.Value.ToString());
            string str;
            if (accounModel.PrjGuid.StartsWith("'"))
            {
                str = accounModel.PrjGuid.ToString();
            }
            else
            {
                str = "'" + accounModel.PrjGuid.ToString() + "'";
            }
            text = text + " and PrjGuid in (" + str + ")";
        }
        text += " order by PayTime desc ";
        DataTable reportByWhere = this.accountBLL.getReportByWhere(base.Request.QueryString["type"], text);

        for (int i = 0; i < reportByWhere.Rows.Count; i++)
        {
            this.yingzhi += Convert.ToDecimal(reportByWhere.Rows[i]["PayMoney"].ToString());
            this.yizhi   += Convert.ToDecimal(reportByWhere.Rows[i]["AccountMoney"].ToString());
        }
        return(reportByWhere);
    }
Exemple #9
0
 protected void bindPage()
 {
     if (!string.IsNullOrEmpty(this.TemAccountid))
     {
         AccounModel accounModel = new AccounModel();
         accounModel = this.bll.GetModel(this.TemAccountid);
         if (accounModel != null)
         {
             string[] array = accounModel.PrjGuid.ToString().Split(new char[]
             {
                 ','
             });
             new ArrayList();
             DataTable dataTable = new DataTable();
             dataTable.Columns.Add("id", typeof(string));
             dataTable.Columns.Add("name", typeof(string));
             for (int i = 0; i < array.Length; i++)
             {
                 string    str        = array[i].ToString().Replace("'", "");
                 string    sqlString  = "select * from pt_prjinfo where isvalid=1 and PrjGuid='" + str + "' ";
                 DataTable dataTable2 = publicDbOpClass.DataTableQuary(sqlString);
                 if (dataTable2 != null && dataTable2.Rows.Count > 0)
                 {
                     DataRow dataRow = dataTable.NewRow();
                     dataRow["id"]   = dataTable2.Rows[0]["PrjGuid"];
                     dataRow["name"] = dataTable2.Rows[0]["PrjName"];
                     dataTable.Rows.Add(dataRow);
                 }
             }
             this.dropPrjCodeList.DataTextField  = "name";
             this.dropPrjCodeList.DataValueField = "id";
             this.dropPrjCodeList.DataSource     = dataTable;
             this.dropPrjCodeList.DataBind();
         }
     }
 }
Exemple #10
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        AccountLogic accountLogic = new AccountLogic();
        AccounModel  model        = new AccounModel();
        bool         flag         = false;

        if (this._Action == "add")
        {
            model = this.getModel();
            if (accountLogic.Add(model) > 0)
            {
                flag = true;
            }
        }
        else
        {
            if (this._Action == "edit")
            {
                model = this.getModel();
                flag  = accountLogic.Update(model);
            }
        }
        if (flag)
        {
            StringBuilder stringBuilder = new StringBuilder();
            stringBuilder.Append("parent.desktop.flowclass.location = '/fund/Account/PrjAccount.aspx?prjId=" + base.Request["PrjCode"] + "';");
            stringBuilder.Append("alert('保存成功');");
            stringBuilder.Append("top.frameWorkArea.window.desktop.getActive().close();");
            base.ClientScript.RegisterClientScriptBlock(base.GetType(), "sc", "<script>" + stringBuilder.ToString() + "</script>");
            return;
        }
        StringBuilder stringBuilder2 = new StringBuilder();

        stringBuilder2.Append("alert('保存失败');");
        base.ClientScript.RegisterClientScriptBlock(base.GetType(), "sc", "<script>" + stringBuilder2.ToString() + "</script>");
    }
Exemple #11
0
 public bool Update(AccounModel model)
 {
     return(this.dal.Update(model));
 }
Exemple #12
0
        public List <AccounModel> DataTableToList(DataTable dt)
        {
            List <AccounModel> list = new List <AccounModel>();
            int count = dt.Rows.Count;

            if (count > 0)
            {
                for (int i = 0; i < count; i++)
                {
                    AccounModel item = new AccounModel();
                    if ((dt.Rows[i]["AccountID"] != null) && (dt.Rows[i]["AccountID"].ToString() != ""))
                    {
                        item.AccountID = new Guid(dt.Rows[i]["AccountID"].ToString());
                    }
                    if ((dt.Rows[i]["PrjGuid"] != null) && (dt.Rows[i]["PrjGuid"].ToString() != ""))
                    {
                        item.PrjGuid = dt.Rows[i]["PrjGuid"].ToString();
                    }
                    if ((dt.Rows[i]["accountNum"] != null) && (dt.Rows[i]["accountNum"].ToString() != ""))
                    {
                        item.accountNum = dt.Rows[i]["accountNum"].ToString();
                    }
                    if ((dt.Rows[i]["acountName"] != null) && (dt.Rows[i]["acountName"].ToString() != ""))
                    {
                        item.acountName = dt.Rows[i]["acountName"].ToString();
                    }
                    if ((dt.Rows[i]["creatData"] != null) && (dt.Rows[i]["creatData"].ToString() != ""))
                    {
                        item.creatDate = new DateTime?(DateTime.Parse(dt.Rows[i]["creatData"].ToString()));
                    }
                    if ((dt.Rows[i]["createMan"] != null) && (dt.Rows[i]["createMan"].ToString() != ""))
                    {
                        item.createMan = dt.Rows[i]["createMan"].ToString();
                    }
                    if ((dt.Rows[i]["activeData"] != null) && (dt.Rows[i]["activeData"].ToString() != ""))
                    {
                        item.activeDate = new DateTime?(DateTime.Parse(dt.Rows[i]["activeData"].ToString()));
                    }
                    if ((dt.Rows[i]["activeMan"] != null) && (dt.Rows[i]["activeMan"].ToString() != ""))
                    {
                        item.activeMan = dt.Rows[i]["activeMan"].ToString();
                    }
                    if ((dt.Rows[i]["authorizer"] != null) && (dt.Rows[i]["authorizer"].ToString() != ""))
                    {
                        item.authorizer = dt.Rows[i]["authorizer"].ToString();
                    }
                    if ((dt.Rows[i]["closeData"] != null) && (dt.Rows[i]["closeData"].ToString() != ""))
                    {
                        item.closeDate = new DateTime?(DateTime.Parse(dt.Rows[i]["closeData"].ToString()));
                    }
                    if ((dt.Rows[i]["closeMan"] != null) && (dt.Rows[i]["closeMan"].ToString() != ""))
                    {
                        item.closeMan = dt.Rows[i]["closeMan"].ToString();
                    }
                    if ((dt.Rows[i]["Remark"] != null) && (dt.Rows[i]["Remark"].ToString() != ""))
                    {
                        item.Remark = dt.Rows[i]["Remark"].ToString();
                    }
                    if ((dt.Rows[i]["initialFund"] != null) && (dt.Rows[i]["initialFund"].ToString() != ""))
                    {
                        item.initialFund = new decimal?(decimal.Parse(dt.Rows[i]["initialFund"].ToString()));
                    }
                    if ((dt.Rows[i]["AccountState"] != null) && (dt.Rows[i]["AccountState"].ToString() != ""))
                    {
                        item.AccountState = new int?(int.Parse(dt.Rows[i]["AccountState"].ToString()));
                    }
                    if ((dt.Rows[i]["FlowState"] != null) && (dt.Rows[i]["FlowState"].ToString() != ""))
                    {
                        item.FlowState = new int?(int.Parse(dt.Rows[i]["FlowState"].ToString()));
                    }
                    if ((dt.Rows[i]["moneyRate"] != null) && (dt.Rows[i]["moneyRate"].ToString() != ""))
                    {
                        item.moneyRate = new decimal?(decimal.Parse(dt.Rows[i]["moneyRate"].ToString()));
                    }
                    if ((dt.Rows[i]["IncomeFund"] != null) && (dt.Rows[i]["IncomeFund"].ToString() != ""))
                    {
                        item.IncomeFund = new decimal?(decimal.Parse(dt.Rows[i]["IncomeFund"].ToString()));
                    }
                    if ((dt.Rows[i]["PayoutFund"] != null) && (dt.Rows[i]["PayoutFund"].ToString() != ""))
                    {
                        item.PayoutFund = new decimal?(decimal.Parse(dt.Rows[i]["PayoutFund"].ToString()));
                    }
                    if ((dt.Rows[i]["CurrentFund"] != null) && (dt.Rows[i]["CurrentFund"].ToString() != ""))
                    {
                        item.CurrentFund = new decimal?(decimal.Parse(dt.Rows[i]["CurrentFund"].ToString()));
                    }
                    list.Add(item);
                }
            }
            return(list);
        }
Exemple #13
0
 public int Add(AccounModel model)
 {
     return(this.dal.Add(model));
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!base.IsPostBack)
     {
         this.ddlType.Attributes.Add("onchange", "TypeChange()");
         this.hdnZHID.Value = base.Request.QueryString["ZHID"].ToString();
         if (base.Request.QueryString["Action"] == "Add")
         {
             this.txtAccCode.Text     = DateTime.Now.ToString("yyyyMMddHHmmssfff");
             this.hdnAccountID.Value  = Guid.NewGuid().ToString();
             this.txtInDate.Text      = DateTime.Now.ToString("yyyy-MM-dd");
             this.txtInPeople.Text    = com.jwsoft.pm.entpm.PageHelper.QueryUser(this, base.UserCode);
             this.hdnPeopleCode.Value = base.UserCode;
             this.DaGet.Text          = DateTime.Now.ToString("yyyy-MM-dd");
             this.aM = this.al.GetModel(this.hdnZHID.Value);
             if (!this.aM.PrjGuid.StartsWith("'"))
             {
                 PrjInfoModel modelByPrjGuid = this.ptPrjInfo.GetModelByPrjGuid(this.aM.PrjGuid);
                 if (modelByPrjGuid != null)
                 {
                     this.txtPrjName.Text      = modelByPrjGuid.PrjName;
                     this.hdnProjectCode.Value = this.aM.PrjGuid;
                 }
             }
         }
         else
         {
             this.hdnAccountID.Value   = base.Request.QueryString["AccountID"].ToString();
             this.accountModel         = this.AccountBll.GetModel(new Guid(this.hdnAccountID.Value));
             this.txtAccCode.Text      = this.accountModel.InCode.ToString();
             this.hdnAccountID.Value   = this.accountModel.InUid.ToString();
             this.txtInDate.Text       = Convert.ToDateTime(this.accountModel.InDate).ToString("yyyy-MM-dd");
             this.txtInPeople.Text     = com.jwsoft.pm.entpm.PageHelper.QueryUser(this, this.accountModel.InPeople);
             this.hdnPeopleCode.Value  = this.accountModel.InPeople;
             this.DaGet.Text           = Convert.ToDateTime(this.accountModel.GetDate).ToString("yyyy-MM-dd");
             this.hdnProjectCode.Value = this.accountModel.PrjGuid.ToString();
             PrjInfoModel modelByPrjGuid2 = this.ptPrjInfo.GetModelByPrjGuid(this.accountModel.PrjGuid);
             if (modelByPrjGuid2 != null)
             {
                 this.txtPrjName.Text = modelByPrjGuid2.PrjName;
             }
             this.hdnContCode.Value     = this.accountModel.ContractID.ToString();
             this.hdnPlanUid.Value      = this.accountModel.PlanUid.ToString();
             this.ddlType.SelectedValue = this.accountModel.Subject.ToString();
             this.txtRemark.Text        = this.accountModel.Remark.ToString();
             DataTable allNews = this.AccountBll.GetAllNews(this.accountModel.ContractID);
             if (allNews.Rows.Count > 0)
             {
                 this.hdnPlanUid.Value = allNews.Rows[0]["UID"].ToString();
                 if (!string.IsNullOrEmpty(allNews.Rows[0]["PlanDate"].ToString()))
                 {
                     this.txtPlan.Text      = Convert.ToDateTime(allNews.Rows[0]["PlanDate"].ToString()).ToString("yyyy年MM月");
                     this.txtPlanMoney.Text = allNews.Rows[0]["ThisBalance"].ToString();
                 }
                 else
                 {
                     this.txtPlan.Text      = "";
                     this.txtPlanMoney.Text = "0.00";
                 }
                 this.txtContName.Text = allNews.Rows[0]["cllectionCode"].ToString();
             }
             this.txtInMoney.Text  = this.accountModel.InMoney.ToString();
             this.txtGetMoney.Text = this.accountModel.GetMoney.ToString();
         }
         this.FileUpload1.Class      = "AccounIncome";
         this.FileUpload1.RecordCode = this.hdnAccountID.Value;
     }
 }
Exemple #15
0
 private void ToInitialize()
 {
     if (this._Ic != "" && this._Ic.Length == 36)
     {
         AccounModel  accounModel  = new AccounModel();
         AccountLogic accountLogic = new AccountLogic();
         accounModel = accountLogic.GetModel(this._ic);
         Fund_Prj_Accoun fund_Prj_Accoun = new Fund_Prj_Accoun();
         string          strwhere        = " AND AccountID='" + this._ic + "'";
         DataTable       accounSumInfo   = fund_Prj_Accoun.getAccounSumInfo(strwhere);
         if (accounModel != null)
         {
             this.txtaccountNum.Text  = accounModel.accountNum;
             this.txtacountName.Text  = accounModel.acountName;
             this.txtRemark.Text      = accounModel.Remark;
             this.txtinitialFund.Text = accounModel.initialFund.ToString();
             this.lblPrintDate.Text   = DateTime.Now.ToShortDateString();
             this.lblPrintPeople.Text = PageHelper.QueryUser(this, base.UserCode);
             this.lblPrj.Text         = accountLogic.getPrjName(accounModel.PrjGuid);
         }
         if (accounSumInfo.Rows.Count > 0)
         {
             if (accounSumInfo.Rows[0]["UsableJE"] != null && accounSumInfo.Rows[0]["UsableJE"].ToString() != "")
             {
                 this.keyongyue.Text = string.Format("{0:0.000}", double.Parse(accounSumInfo.Rows[0]["UsableJE"].ToString()));
             }
             else
             {
                 this.keyongyue.Text = "0.000";
             }
             if (accounSumInfo.Rows[0]["JE"] != null && accounSumInfo.Rows[0]["JE"].ToString() != "")
             {
                 this.zhanghuyue.Text = string.Format("{0:0.000}", double.Parse(accounSumInfo.Rows[0]["JE"].ToString()));
             }
             else
             {
                 this.zhanghuyue.Text = "0.000";
             }
             if (accounSumInfo.Rows[0]["OtherIncome"] != null && accounSumInfo.Rows[0]["OtherIncome"].ToString() != "")
             {
                 this.qitashouru.Text = string.Format("{0:0.000}", double.Parse(accounSumInfo.Rows[0]["OtherIncome"].ToString()));
             }
             else
             {
                 this.qitashouru.Text = "0.000";
             }
             if (accounSumInfo.Rows[0]["ContIncomeRZ"] != null && accounSumInfo.Rows[0]["ContIncomeRZ"].ToString() != "")
             {
                 this.ruzhang.Text = string.Format("{0:0.000}", double.Parse(accounSumInfo.Rows[0]["ContIncomeRZ"].ToString()));
             }
             else
             {
                 this.ruzhang.Text = "0.000";
             }
             if (accounSumInfo.Rows[0]["Loan"] != null && accounSumInfo.Rows[0]["Loan"].ToString() != "")
             {
                 this.jiekuan.Text = string.Format("{0:0.000}", double.Parse(accounSumInfo.Rows[0]["Loan"].ToString()));
             }
             else
             {
                 this.jiekuan.Text = "0.000";
             }
             if (accounSumInfo.Rows[0]["ReturnLoanBJ"] != null && accounSumInfo.Rows[0]["ReturnLoanBJ"].ToString() != "")
             {
                 this.benjin.Text = string.Format("{0:0.000}", double.Parse(accounSumInfo.Rows[0]["ReturnLoanBJ"].ToString()));
             }
             else
             {
                 this.benjin.Text = "0.000";
             }
             if (accounSumInfo.Rows[0]["ReturnLoanOther"] != null && accounSumInfo.Rows[0]["ReturnLoanOther"] != "")
             {
                 this.lixijiqita.Text = string.Format("{0:0.000}", double.Parse(accounSumInfo.Rows[0]["ReturnLoanOther"].ToString()));
             }
             else
             {
                 this.lixijiqita.Text = "0.000";
             }
             if (accounSumInfo.Rows[0]["MustPaidCont"] != null && accounSumInfo.Rows[0]["MustPaidCont"].ToString() != "")
             {
                 this.YZhetonge.Text = string.Format("{0:0.000}", double.Parse(accounSumInfo.Rows[0]["MustPaidCont"].ToString()));
             }
             else
             {
                 this.YZhetonge.Text = "0.000";
             }
             if (accounSumInfo.Rows[0]["MustPaidOtherCost"] != null && accounSumInfo.Rows[0]["MustPaidOtherCost"].ToString() != "")
             {
                 this.YZjianjiefeiyong.Text = string.Format("{0:0.000}", double.Parse(accounSumInfo.Rows[0]["MustPaidOtherCost"].ToString()));
             }
             else
             {
                 this.YZjianjiefeiyong.Text = "0.000";
             }
             if (accounSumInfo.Rows[0]["UnpaidCont"] != null && accounSumInfo.Rows[0]["UnpaidCont"].ToString() != "")
             {
                 this.WZhetonge.Text = string.Format("{0:0.000}", double.Parse(accounSumInfo.Rows[0]["UnpaidCont"].ToString()));
             }
             else
             {
                 this.WZhetonge.Text = "0.000";
             }
             if (accounSumInfo.Rows[0]["UnpaidOtherCost"] != null && accounSumInfo.Rows[0]["UnpaidOtherCost"].ToString() != "")
             {
                 this.WZjianjiefeiyong.Text = string.Format("{0:0.000}", double.Parse(accounSumInfo.Rows[0]["UnpaidOtherCost"].ToString()));
                 return;
             }
             this.WZjianjiefeiyong.Text = "0.000";
         }
     }
 }
Exemple #16
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!base.IsPostBack)
     {
         this.hdnZHID.Value = base.Request.QueryString["ZHID"].ToString();
         this.HdnSub.Value  = base.Request.QueryString["Sub"].ToString();
         string          strwhere        = " and AccountID='" + base.Request["ZHID"].ToString() + "' ";
         Fund_Prj_Accoun fund_Prj_Accoun = new Fund_Prj_Accoun();
         DataTable       accounSumInfo   = fund_Prj_Accoun.getAccounSumInfo(strwhere);
         this.hdnyue.Value = accounSumInfo.Rows[0]["JE"].ToString();
         if (this.HdnSub.Value == "0")
         {
             this.lblSel.Text = "资金支付申请";
         }
         else
         {
             this.lblSel.Text = "费用名称";
         }
         if (base.Request.QueryString["Action"] == "Add")
         {
             this.txtAccCode.Text     = DateTime.Now.ToString("yyyyMMddHHmmssfff");
             this.hdnAccountID.Value  = Guid.NewGuid().ToString();
             this.txtInDate.Text      = DateTime.Now.ToString("yyyy-MM-dd");
             this.txtInPeople.Text    = com.jwsoft.pm.entpm.PageHelper.QueryUser(this, base.UserCode);
             this.hdnPeopleCode.Value = base.UserCode;
             this.aM = this.al.GetModel(this.hdnZHID.Value);
             if (!this.aM.PrjGuid.StartsWith("'"))
             {
                 PrjInfoModel modelByPrjGuid = this.ptPrjInfo.GetModelByPrjGuid(this.aM.PrjGuid);
                 if (modelByPrjGuid != null)
                 {
                     this.txtPrjName.Text      = modelByPrjGuid.PrjName;
                     this.hdnProjectCode.Value = this.aM.PrjGuid;
                 }
             }
         }
         else
         {
             this.hdnAccountID.Value   = base.Request.QueryString["AccountID"].ToString();
             this.accountModel         = this.AccountBll.GetModel(new Guid(this.hdnAccountID.Value));
             this.txtAccCode.Text      = this.accountModel.PayOutCode.ToString();
             this.txtInDate.Text       = Convert.ToDateTime(this.accountModel.PayOutTime).ToString("yyyy-MM-dd");
             this.txtInPeople.Text     = com.jwsoft.pm.entpm.PageHelper.QueryUser(this, this.accountModel.PayOutPeople);
             this.hdnPeopleCode.Value  = this.accountModel.PayOutPeople;
             this.hdnProjectCode.Value = this.accountModel.prjGuid.ToString();
             PrjInfoModel modelByPrjGuid2 = this.ptPrjInfo.GetModelByPrjGuid(this.accountModel.prjGuid);
             if (modelByPrjGuid2 != null)
             {
                 this.txtPrjName.Text = modelByPrjGuid2.PrjName;
             }
             this.txtRemark.Text   = this.accountModel.Remark.ToString();
             this.txtInMoney.Text  = this.accountModel.PayOutMoney.ToString();
             this.txtHandler.Text  = this.accountModel.Handler.ToString();
             this.hdnRPUID.Value   = this.accountModel.RPGuid.ToString();
             this.txtPayOut.Text   = this.AccountBll.getMoneyByPayCode(this.accountModel.RPGuid.ToString()).ToString();
             this.txtPayMoney.Text = "0.00";
             if (this.HdnSub.Value == "0")
             {
                 PayoutPayment      payoutPayment = new PayoutPayment();
                 PayoutPaymentModel model         = payoutPayment.GetModel(this.accountModel.RPGuid.ToString());
                 if (model != null)
                 {
                     this.txtRPCode.Text   = model.PaymentCode.ToString();
                     this.txtPayMoney.Text = model.PaymentMoney.ToString();
                 }
             }
             else
             {
                 string    strwhere2 = " inDiaryId ='" + this.accountModel.RPGuid.ToString() + "' ";
                 DataTable dtByWhere = OrganizationDiary.getDtByWhere(strwhere2);
                 if (dtByWhere.Rows.Count > 0)
                 {
                     if (string.IsNullOrEmpty(dtByWhere.Rows[0]["Total"].ToString()))
                     {
                         this.txtPayMoney.Text = "0.00";
                     }
                     else
                     {
                         this.txtPayMoney.Text = dtByWhere.Rows[0]["Total"].ToString();
                     }
                     this.txtRPCode.Text = dtByWhere.Rows[0]["Name"].ToString();
                 }
             }
             this.txtJianMoney.Text = (Convert.ToDecimal(this.txtPayMoney.Text) - Convert.ToDecimal(this.txtPayOut.Text)).ToString();
         }
         this.FileUpload1.Class      = "AccountPayOut";
         this.FileUpload1.RecordCode = this.hdnAccountID.Value;
     }
 }