コード例 #1
0
 public ActionResult test(cms cm)
 {
     ModelState.Clear();
     cm.poleno = "jlm10542";
     return View(cm);
 }
コード例 #2
0
 public ActionResult homesave(cms cm)
 {
     return View("home", cm);
 }
コード例 #3
0
        public ActionResult homedetails(cms cm)
        {
            ModelState.Clear();
            DataSet ds = new DataSet();
            cm.Date = DateTime.Now;
            if (cm.crn != null)
            {
                ds = service.Z_BAPI_CMS_ISU_CA_DISPLAY("", "", cm.crn, "", "", "");
            }
            if (cm.ca != null)
            {
                ds = service.Z_BAPI_CMS_ISU_CA_DISPLAY(cm.ca, "", "", "", "", "");
            }
            if (cm.contact1 != null)
            {
                ds = service.Z_BAPI_CMS_ISU_CA_DISPLAY("", "", "", cm.contact1, "", "");
            }

            if (ds.Tables[0].Rows.Count > 0)
            {
                cm.crn = ds.Tables[0].Rows[0]["Legacy_Acct"].ToString();
                cm.ca = ds.Tables[0].Rows[0]["Ca_Number"].ToString();
                cm.consumer_name = ds.Tables[0].Rows[0]["Bp_Name"].ToString();
                cm.contact1 = ds.Tables[0].Rows[0]["Telephone_No"].ToString();
                cm.address = ds.Tables[0].Rows[0]["House_Number"].ToString() + ds.Tables[0].Rows[0]["House_Number_Sup"].ToString() + ", " + ds.Tables[0].Rows[0]["Floor"].ToString() + ", " + ds.Tables[0].Rows[0]["Street"].ToString() + ", " + ds.Tables[0].Rows[0]["Street2"].ToString() + ", " + ds.Tables[0].Rows[0]["Street3"].ToString() + ", " + ds.Tables[0].Rows[0]["Street4"].ToString() + ", " + ds.Tables[0].Rows[0]["City"].ToString() + ", PostCode: " + ds.Tables[0].Rows[0]["Post_Code"].ToString() + " .";
            }
            cm.faultcategory = faultcat;
            ViewData["typeoffault"] = new SelectList(typefaulte);
            return View("home", cm);
        }
コード例 #4
0
 public ActionResult homepost(cms cm)
 {
     ModelState.Clear();
     cm.Date = DateTime.Now;
     cm.faultcategory = faultcat;
     ViewData["typeoffault"] = new SelectList(typefaulte);
     return View(cm);
 }
コード例 #5
0
 public ActionResult home(int comtype = 0)
 {
     ModelState.Clear();
     cms cm = new cms();
     faulttype = comtype;
     cm.Date = DateTime.Now;
     List<string[,]> temp = FetchFaultCat();
     foreach (string[,] temper in temp)
     {
         if (faulttype == Int16.Parse(temper[0, 0]))
         {
             faultcat = cm.faultcategory = temper[0, 1];
             typefaulte = Fetchtypefault(faulttype);
         }
     }
     ViewData["typeoffault"] = new SelectList(typefaulte);
     return View(cm);
 }