public static PropertySizeList ViewPropertySize(Int32 SizeID) { PropertySizeList objSize = new PropertySizeList(); using (var context = new SycousCon()) { try { objSize = (from p in context.PropertySizes join C in context.ClientMasters on p.ClientID equals C.ClientID join S in context.SiteMasters on p.SiteID equals S.Id where (p.IsDeleted == 0 && p.ID == SizeID) orderby p.CreateDate descending select new PropertySizeList() { ID = SqlFunctions.StringConvert((Double)p.ID).Trim(), PropertySize = p.PropertySize1, Client = C.Name, Site = S.SiteName, ClientID = SqlFunctions.StringConvert((Double)C.ClientID).Trim(), SiteID = SqlFunctions.StringConvert((Double)S.Id).Trim() }).SingleOrDefault(); return objSize; } catch (Exception ex) { context.Dispose(); throw; } } }
public ActionResult SView(String Size_ID) { if (Session["Login"] != null) { LoginSession loginsession = (LoginSession)Session["Login"]; ViewBag.CompanyLogo = loginsession.CompanyLogo; ViewBag.Layout1 = BAL.Common.LayoutType(loginsession.UserType); String actionName = this.ControllerContext.RouteData.Values["action"].ToString(); String controllerName = this.ControllerContext.RouteData.Values["controller"].ToString(); ViewBag.Menu = BAL.Common.GetActiveMenu(controllerName, actionName, BAL.Common.LayoutType(loginsession.UserType)); ViewBag.RoleName = loginsession.RoleName; if (Size_ID != null) { String Dec_SizeID = BAL.Security.URLDecrypt(Size_ID); PropertySizeList Size = new PropertySizeList(); if ((Dec_SizeID != "0") && (Dec_SizeID != null)) { Size = BAL.PropertySizeModel.ViewPropertySize(Dec_SizeID); } return View(Size); } else { return RedirectToAction("Index", "PropertySize"); } } else { return RedirectToAction("Index", "Home"); } }
public Object ViewRecord(Int64 SizeID) { PropertySizeList Size = new PropertySizeList(); try { Size = DAL.DALPropertySize.ViewPropertySize(Convert.ToInt32(SizeID)); } catch (Exception ex) { throw; } return Size; }