Пример #1
0
        public ActionResult Firmloan1(FirmLoanStep1 c, FormCollection values)
        {
            if (ModelState.IsValid)
             {
                 string productcode = values["productcode"].ToString();
                 string producttype = values["producttype"].ToString();

                 if (Session[BizCommon.g_SessionName_ApplyProject] != null)
                 {
                     //若session中已经存在申请对象,则将本步骤所取得的值赋到session中的对象上;
                     (Session[BizCommon.g_SessionName_ApplyProject] as ApplyingRecord).FirmAccountBill = c.FirmAccountBill;
                     (Session[BizCommon.g_SessionName_ApplyProject] as ApplyingRecord).FirmAge = c.FirmAge;
                     (Session[BizCommon.g_SessionName_ApplyProject] as ApplyingRecord).FirmProperty = c.FirmProperty;
                     (Session[BizCommon.g_SessionName_ApplyProject] as ApplyingRecord).FirmType = c.FirmType;

                     (Session[BizCommon.g_SessionName_ApplyProject] as ApplyingRecord).ProductCode = productcode;
                     (Session[BizCommon.g_SessionName_ApplyProject] as ApplyingRecord).ProductType = producttype;

                     return View("Firmloan2");
                 }
                 else
                 {
                     //否则,新创建一个申请对象,并将本步骤取得值赋到新的对象上,然后将对象放到session中;
                     ApplyingRecord p = new ApplyingRecord();
                     p.FirmAccountBill = c.FirmAccountBill;
                     p.FirmAge = c.FirmAge;
                     p.FirmProperty = c.FirmProperty;
                     p.FirmType = c.FirmType;
                     p.ProductCode = productcode;
                     p.ProductType = producttype;

                     //第一步创建project类放到session中
                     if (Session[BizCommon.g_SessionName_ApplyProject] != null)
                         Session[BizCommon.g_SessionName_ApplyProject] = null;

                     Session[BizCommon.g_SessionName_ApplyProject] = p;

                     return View("Firmloan2");
                 }
             }

             //万一发生异常时,将执行以下代码(即返回第一步页面)
             //第一步中的下拉选项预加载
             ViewBag.FirmAge = BizCommon.GetAA10Items("sFirmAge", "cast(aaa102 as int)");
             ViewBag.FirmProperty = BizCommon.GetAA10Items("sFirmProperty", "cast(aaa102 as int)");
             ViewBag.FirmType = BizCommon.GetAA10Items("sFirmType", "cast(aaa102 as int)");
             return View("Firmloan1");
        }
Пример #2
0
        public ActionResult Firmloan1(string productcode, string producttype)
        {
            ViewBag.productcode = productcode;
            ViewBag.producttype = producttype;

            //第一步中的下拉选项预加载
            ViewBag.FirmAge = BizCommon.GetAA10Items("sFirmAge", "cast(aaa102 as int)");
            ViewBag.FirmProperty = BizCommon.GetAA10Items("sFirmProperty", "cast(aaa102 as int)");
            ViewBag.FirmType = BizCommon.GetAA10Items("sFirmType", "cast(aaa102 as int)");

            if (Session[BizCommon.g_SessionName_ApplyProject] != null)
            {
                //为了防止已填写数据丢失,此处将Session中的内容取出填入
                ApplyingRecord p = (Session[BizCommon.g_SessionName_ApplyProject] as ApplyingRecord);
                FirmLoanStep1 m = new FirmLoanStep1();

                m.FirmAccountBill = p.FirmAccountBill;         //输入
                m.FirmAge = p.FirmAge;                          //选项
                m.FirmProperty = p.FirmProperty;               //选项
                m.FirmType = p.FirmType;                         //选项

                return View(m);
            }
            else
            {
                return View();
            }
        }