Exemple #1
0
 public static Designation MapClientToServer(this Models.DesignationModel source)
 {
     return(new Designation
     {
         DesignationId = source.DesignationId,
         Abbreviation = source.Abbreviation,
         Description = source.Description,
         Title = source.Title,
         RecCreatedBy = source.RecCreatedBy,
         RecCreatedDt = source.RecCreatedDt,
         RecLastUpdatedBy = source.RecLastUpdatedBy,
         RecLastUpdatedDt = source.RecLastUpdatedDt
     });
 }
        public ActionResult Create(int?id)
        {
            DesignationModel exModel = new Models.DesignationModel();

            if (id != null)
            {
                var designationModel = designationService.GetDesignationById(Convert.ToInt32(id));

                if (designationModel != null)
                {
                    exModel = designationModel.MapServerToClient();
                }
            }

            ViewBag.MessageVM = TempData["message"] as MessageViewModel;
            return(View(exModel));
        }