public ActionResult SView(String OwnershipID)
 {
     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 (OwnershipID != null)
         {
             String Dec_OwnershipID = BAL.Security.URLDecrypt(OwnershipID);
             PropertyOwnershipList owner = new PropertyOwnershipList();
             if ((Dec_OwnershipID != "0") && (Dec_OwnershipID != null))
             {
                 owner = BAL.PropertyOwnerShipModel.ViewPropertyOwnerShip(Dec_OwnershipID);
             }
             return View(owner);
         }
         else
         { return RedirectToAction("Index", "ProppertyOwnership"); }
     }
     else
     { return RedirectToAction("Index", "Home"); }
 }
Ejemplo n.º 2
0
        public static PropertyOwnershipList ViewPropertyOwnership(Int32 ownershipID)
        {
            PropertyOwnershipList objownership = new PropertyOwnershipList();
               using (var context = new SycousCon())
               {
               try
               {
                   objownership = (from p in context.PropertyOwnershipTypes
                                   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 == ownershipID)
                                   orderby p.CreateDate descending
                                   select new PropertyOwnershipList()
                                   {
                                       ID = SqlFunctions.StringConvert((Double)p.ID).Trim(),
                                       OwnershipType = p.OwnershipType,
                                       Client = C.Name,
                                       Site = S.SiteName,
                                       ClientID = SqlFunctions.StringConvert((Double)C.ClientID).Trim(),
                                       SiteID = SqlFunctions.StringConvert((Double)S.Id).Trim()
                                   }).FirstOrDefault();

               }
               catch (Exception ex)
               {
                   context.Dispose();
                   throw;
               }
               }
               return objownership;
        }
Ejemplo n.º 3
0
        public Object ViewRecord(Int64 ownershipID)
        {
            PropertyOwnershipList vwPropertyownership = new PropertyOwnershipList();
            try
            {
                vwPropertyownership = DAL.DALPropertyOwnership.ViewPropertyOwnership(Convert.ToInt32(ownershipID));

            }
            catch (Exception ex)
            {
                throw;
            }
            return vwPropertyownership;
        }