Ejemplo n.º 1
0
        public static PropertyTypeList ViewPropertyType(Int32 TypeID)
        {
            PropertyTypeList objproperty = new PropertyTypeList();
               using (var context = new SycousCon())
               {
               try
               {
                   objproperty = (from p in context.PropertyTypes
                                  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 == TypeID)
                                  orderby p.CreateDate descending
                                  select new PropertyTypeList()
                                  {
                                      ID = SqlFunctions.StringConvert((Double)p.ID).Trim(),
                                      PropertyType = p.PropertyType1,
                                      Client = C.Name,
                                      Site = S.SiteName,
                                      ClientID = SqlFunctions.StringConvert((Double)C.ClientID).Trim(),
                                      SiteID = SqlFunctions.StringConvert((Double)S.Id).Trim()
                                  }).FirstOrDefault();

                   return objproperty;
               }
               catch (Exception ex)
               {
                   context.Dispose();
                   throw;
               }
               }
        }
Ejemplo n.º 2
0
 public ActionResult TView(String Type_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 (Type_ID != null)
         {
             String Dec_TypeID = BAL.Security.URLDecrypt(Type_ID);
             PropertyTypeList Type = new PropertyTypeList();
             if ((Dec_TypeID != "0") && (Dec_TypeID != null))
             {
                 Type = BAL.PropertyTypeModel.ViewPropertyType(Dec_TypeID);
             }
             return View(Type);
         }
         else
         { return RedirectToAction("Index", "PropertyType"); }
     }
     else
     { return RedirectToAction("Index", "Home"); }
 }
Ejemplo n.º 3
0
        public Object ViewRecord(Int64 TypeID)
        {
            PropertyTypeList vwPropertyType = new PropertyTypeList();
            try
            {
                vwPropertyType = DAL.DALPropertyType.ViewPropertyType(Convert.ToInt32(TypeID));

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