Beispiel #1
0
    protected void btnpublic_Click(object sender, EventArgs e)
    {
        string[] values = Request.Form.GetValues("cbxSelect");
        if (values == null || values.Length < 1)
        {
            Tz888.Common.MessageBox.Show(this.Page, "请选择要静态化的资源!");
            return;
        }
        int result  = 0;
        int results = 0;

        for (int i = 0; i < values.Length; i++)
        {
            Tz888.Model.LoansInfoTab infotab = loansinfotabbll.GetLoansInfoTabByLoansInfoId(Convert.ToInt32(values[i].Trim()));
            if (infotab.AuditID == 1 && infotab.BorrowingType == 0)
            {
                Tz888.BLL.Loans.PageStatic stat = new Tz888.BLL.Loans.PageStatic();
                result = stat.StaticHtml(Convert.ToInt32(values[i].Trim()));
            }
            if (infotab.AuditID == 1 && infotab.BorrowingType == 1)
            {
                Tz888.BLL.Loans.PageStaticenprice stats = new Tz888.BLL.Loans.PageStaticenprice();

                results = stats.StaticHtml(Convert.ToInt32(values[i].Trim()));
            }
        }
        Tz888.Common.MessageBox.Show(this.Page, "生成成功");
        ChangePage(par);
    }
    protected void btnUpdate_Click(object sender, EventArgs e)
    {
        Tz888.Model.LoansInfoTab     loansInfotab     = new LoansInfoTab();
        Tz888.Model.LoansInfo        loansinfo        = new LoansInfo();
        Tz888.Model.LoanscontactsTab loanscontactstab = new LoanscontactsTab();
        //贷款主表的修改
        loansInfotab.LoansInfoID = loansInfoID;
        loansInfotab.LoansTitle  = txtCapitalTitle.Text.Trim();
        loansInfotab.Updatetime  = DateTime.Now.ToShortDateString() + " " + DateTime.Now.ToLongTimeString().Trim();
        if (shen.Checked == true)
        {
            loansInfotab.AuditID = 0;
            loansInfotab.Url     = "";
        }
        if (shens.Checked == true)
        {
            loansInfotab.AuditID = 1;
            loansInfotab.AuditID = 1;
            string urladdress = loansInfoTabbll.GetLoansInfoTabByLoansInfoId(loansInfoID).Url.Trim();
            if (urladdress == "")
            {
                loansInfotab.Url = "loans/" + DateTime.Now.ToString("yyyyMM") + "/loans" + DateTime.Now.ToString("yyyyMMdd") + "_" + loansInfoID + ".shtml";
            }
            else
            {
                loansInfotab.Url = urladdress;
            }
        }
        if (shensss.Checked == true)
        {
            loansInfotab.AuditID = 3;
            loansInfotab.Url     = "";
        }
        if (shenssss.Checked == true)
        {
            loansInfotab.AuditID = 5;
            loansInfotab.Url     = "";
        }
        loansInfotab.RecommendID = Convert.ToInt32(radiotuijian.SelectedValue.ToString().Trim());
        int reulstrow1 = loansInfoTabbll.ShenHeLoansInfoTab(loansInfotab);

        //贷款详细表的修改
        loansinfo.CountryID  = this.ZoneSelectControl1.CountryID;
        loansinfo.ProvinceID = this.ZoneSelectControl1.ProvinceID;
        loansinfo.CityID     = this.ZoneSelectControl1.CityID;
        loansinfo.CountyID   = this.ZoneSelectControl1.CountyID;
        if (txtCapitalMoney.Text.Trim() == "" || txtCapitalMoney.Text.Trim() == null)
        {
            loansinfo.Amount = 0;
        }
        else
        {
            loansinfo.Amount = Convert.ToInt32(txtCapitalMoney.Text.Trim());
        }
        loansinfo.Deadline      = Convert.ToInt32(rdlValiditeTerm.SelectedValue.Trim());
        loansinfo.Reimbursement = Convert.ToInt32(this.radiohaiMoney.SelectedValue.Trim());
        loansinfo.Guarantee     = Convert.ToInt32(this.radiodanbao.SelectedValue.Trim());
        loansinfo.BorrowingUse  = txtCapitalIntent.Value.Trim();
        loansinfo.ValidityID    = Convert.ToInt32(rdlValiditeSystem.SelectedValue.Trim());
        loansinfo.Title         = txttitle.Text.Trim();
        loansinfo.Keywords      = txtkeywords.Text.Trim();
        loansinfo.Description   = txtdescript.Text.Trim();
        loansinfo.Reason        = txtreson.Text.Trim();
        int resultrow2 = loansinfobll.ShenHeloansInfo(loansinfo, loansInfoID);

        loanscontactstab.EnterpriseName = "";
        loanscontactstab.ContactsName   = txtcontactsName.Text.Trim();
        loanscontactstab.Telephone      = txtcontactsTel.Text.Trim() + "-" + txttel1.Text.Trim() + "-" + txttel2.Text.Trim();
        loanscontactstab.Moblie         = txtcontactsphone.Text.Trim();
        loanscontactstab.Mail           = txtcontactsemail.Text.Trim();
        loanscontactstab.Address        = this.txtcontactsaddress.Text.Trim();
        int resultrow3 = loanscontacttabbll.UpdateloanscontactsTab(loanscontactstab, loansInfoID);

        if (resultrow3 != 0 && reulstrow1 != 0 && resultrow2 != 0)
        {
            if (loansInfotab.AuditID == 1)
            {
                Tz888.BLL.Loans.PageStatic stat = new Tz888.BLL.Loans.PageStatic();
                stat.StaticHtml(loansInfoID);
                BindShow();
            }
        }
        else
        {
            this.ClientScript.RegisterStartupScript(this.GetType(), "", "alert('审核失败!');", true);
        }
        this.ClientScript.RegisterStartupScript(this.GetType(), "", "alert('审核成功!');location.href='LoansInfoCRM.aspx'", true);
    }