public ActionResult Customer(string ID) { if (ID == null) { ID = ""; } string Code; Code = service.getCustomerCodebyID(ID); LMS.Models.Customer.CustomerRecord custRecord = new Models.Customer.CustomerRecord(); if (Code == null) { Code = ""; } custRecord.Code = Code; return(View(custRecord)); }