protected void rabtnchange(object sender, EventArgs e)
    {
        accBaise   accBaise = new accBaise();
        basieModel model    = accBaise.GetModel(1);
        decimal    num;

        if (model != null)
        {
            num = model.borrowRate.Value;
        }
        else
        {
            num = 0m;
        }
        if (this.RadioButton1.Checked)
        {
            this.isshow.Visible       = true;
            this.RadioButton3.Enabled = true;
            this.RadioButton4.Enabled = true;
            this.TextBox1.Text        = num.ToString();
            return;
        }
        this.RadioButton3.Enabled = false;
        this.RadioButton4.Enabled = false;
        this.isshow.Visible       = false;
    }
Exemple #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!base.IsPostBack)
     {
         accBaise   accBaise   = new accBaise();
         basieModel basieModel = new basieModel();
         basieModel = accBaise.GetModel(1);
         if (basieModel != null)
         {
             if (basieModel.accAllot == 0)
             {
                 this.pr3.Visible = false;
                 this.pr4.Visible = false;
                 this.pr1.Visible = true;
                 this.pr2.Visible = true;
             }
             else
             {
                 this.pr1.Visible = false;
                 this.pr2.Visible = false;
                 this.pr3.Visible = true;
                 this.pr4.Visible = true;
             }
         }
         this.DataBindDrop();
         if (string.Compare(this.action, "Add", true) == 0)
         {
             this.InitAdd();
             return;
         }
         this.InitUpdateAndQuery();
     }
 }
    private void InitContract(fund_ReqinfoModle contract)
    {
        contract.reqNum = this.txtContractCode.Text.Trim();
        accBaise   accBaise = new accBaise();
        basieModel model    = accBaise.GetModel(1);

        if (model != null)
        {
            decimal arg_35_0 = model.borrowRate.Value;
        }
        if (!string.IsNullOrEmpty(this.txtContractMoney.Value.Trim()))
        {
            contract.amount = new decimal?(Convert.ToDecimal(this.txtContractMoney.Value.Trim()));
        }
        contract.auditState    = new int?(-1);
        contract.reqCause      = ((this.txtMainItem.Text.Trim() == null) ? string.Empty : this.txtMainItem.Text.Trim());
        contract.remark        = ((this.txtNotes.Text.Trim() == null) ? string.Empty : this.txtNotes.Text.Trim());
        this.hdfusercode.Value = base.UserCode;
        this.txtUsercode.Value = PageHelper.QueryUser(this, base.UserCode);
        contract.reqPeopNum    = ((this.hdfusercode.Value.Trim() == null) ? string.Empty : this.hdfusercode.Value.Trim());
        if (this.DroType.SelectedValue == "0")
        {
            contract.IsContr = new int?(0);
            contract.PrjNum  = ((this.HiddenField1.Value.ToLower().Trim() == null) ? string.Empty : this.HiddenField1.Value.ToLower().Trim());
        }
        else
        {
            contract.IsContr = new int?(1);
            contract.PrjNum  = ((this.hdnProjectCode.Value.ToLower().Trim() == null) ? string.Empty : this.hdnProjectCode.Value.ToLower().Trim());
        }
        if (!string.IsNullOrEmpty(this.txtStartDate.Text.Trim()))
        {
            contract.reqDate = new DateTime?(Convert.ToDateTime(this.txtStartDate.Text.Trim()));
        }
        if (!string.IsNullOrEmpty(this.txtEndDate.Text.Trim()))
        {
            contract.useDate = new DateTime?(Convert.ToDateTime(this.txtEndDate.Text.Trim()));
        }
        contract.reqType = new int?(int.Parse(this.DropDownList1.SelectedValue));
        if (this.RadioButton2.Checked)
        {
            contract.isInterest  = false;
            contract.isDefault   = false;
            contract.InterestNum = new decimal?(0m);
            return;
        }
        contract.isInterest = true;
        if (this.RadioButton3.Checked)
        {
            contract.isDefault   = true;
            contract.InterestNum = new decimal?(Convert.ToDecimal(this.TextBox1.Text));
            return;
        }
        contract.isDefault   = false;
        contract.InterestNum = new decimal?(Convert.ToDecimal(this.TextBox1.Text));
    }
Exemple #4
0
    public void Bind(string selwhere)
    {
        accBaise   accBaise = new accBaise();
        basieModel model    = accBaise.GetModel(1);

        this.hdfaccAllot.Value      = model.accAllot.ToString();
        this.hdflimits.Value        = model.authority.ToString();
        this.gvwContract.DataSource = this.am.GetAcclist(selwhere, base.UserCode);
        this.gvwContract.DataBind();
        this.contract.Visible = true;
    }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!base.IsPostBack)
     {
         this.DataBindDrop();
         if (string.Compare(this.action, "Add", true) == 0)
         {
             this.InitAdd();
         }
         else
         {
             this.InitUpdateAndQuery();
         }
         accBaise   accBaise = new accBaise();
         basieModel model    = accBaise.GetModel(1);
         if (model != null)
         {
             string value = model.fundRatio.ToString();
             this.hdfrate.Value = value;
             if (model.accAllot == 0)
             {
                 this.Pro1.Visible = true;
                 this.Pro2.Visible = true;
                 this.Pro3.Visible = false;
                 this.Pro4.Visible = false;
                 return;
             }
             this.Pro1.Visible = false;
             this.Pro2.Visible = false;
             this.Pro3.Visible = true;
             this.Pro4.Visible = true;
             return;
         }
         else
         {
             string value = "0";
             this.hdfrate.Value = value;
         }
     }
 }
    protected void gvwContract_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        accBaise   accBaise = new accBaise();
        basieModel model    = accBaise.GetModel(1);
        string     value;

        if (model != null)
        {
            value = model.fundRatio.ToString();
        }
        else
        {
            value = "0";
        }
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            string  text   = ((Label)e.Row.FindControl("lblname")).Text;
            string  value2 = ((HiddenField)e.Row.FindControl("hdfacid")).Value;
            string  text2  = ((Label)e.Row.FindControl("lblmony")).Text;
            string  a      = this.ViewState["type"].ToString();
            decimal num;
            if (a == "0")
            {
                num = System.Convert.ToDecimal(text2) * (System.Convert.ToDecimal(value) / 100m);
            }
            else
            {
                if (a == "1")
                {
                    num = System.Convert.ToDecimal(text2);
                }
                else
                {
                    if (a == "addoper")
                    {
                        num = System.Convert.ToDecimal(text2);
                    }
                    else
                    {
                        num = System.Convert.ToDecimal(text2);
                    }
                }
            }
            e.Row.Attributes["ondblclick"] = string.Concat(new object[]
            {
                "dbClickRow(this,'",
                this.gvwContract.DataKeys[e.Row.RowIndex].Values[0].ToString(),
                "','",
                this.gvwContract.DataKeys[e.Row.RowIndex].Values[4].ToString(),
                "','",
                text,
                "','",
                value2,
                "','",
                num,
                "', true)"
            });
            e.Row.Attributes["id"]             = this.gvwContract.DataKeys[e.Row.RowIndex].Value.ToString();
            e.Row.Attributes["guid"]           = this.gvwContract.DataKeys[e.Row.RowIndex].Value.ToString();
            e.Row.Attributes["isMainContract"] = this.gvwContract.DataKeys[e.Row.RowIndex].Values[1].ToString();
            e.Row.Attributes["prjGuid"]        = this.gvwContract.DataKeys[e.Row.RowIndex].Values[2].ToString();
            e.Row.Attributes["auditContent"]   = "支出合同 :" + this.gvwContract.DataKeys[e.Row.RowIndex].Values[3].ToString();
        }
    }