Ejemplo n.º 1
0
        public ActionResult AccessMaster()
        {
            modelSettings obj = new modelSettings();

            ViewBag.Role       = Session["msgRole"];
            Session["msgRole"] = null;

            GetRoleName();

            return(View());
        }
Ejemplo n.º 2
0
        public ActionResult Settings()
        {
            modelSettings obj       = new modelSettings();
            var           CompanyID = 10001;
            var           p         = dc.tblCompanyDetailsMasters.Find(CompanyID);

            if (p != null)
            {
                obj.SiteTitle             = p.SiteTitle;
                obj.TagLine               = p.TagLine;
                obj.AdministrativeEmailID = p.AdministrativeEmailID;
                obj.TimeZone              = p.TimeZone;
                obj.DateFromat            = p.DateFromat;
                obj.TimeFormat            = p.TimeFormat;
                obj.WeekStartOn           = p.WeekStartOn;
                obj.CompLogo              = p.CompLogo;
                obj.SiteIcon              = p.SiteIcon;
                obj.CompanyAddress        = p.CompanyAddress;
            }
            else
            {
                obj.SiteTitle             = "";
                obj.TagLine               = "";
                obj.AdministrativeEmailID = "";
                obj.TimeZone              = "";
                obj.DateFromat            = "";
                obj.TimeFormat            = "";
                obj.WeekStartOn           = "";
                obj.CompLogo              = "";
                obj.SiteIcon              = "";
                obj.CompanyAddress        = "";
            }

            var p1 = dc.tblLoginSettingMasters.Find(CompanyID);

            if (p1 != null)
            {
                obj.LoginPageLogo    = p1.LoginPageLogo;
                obj.LogoWidth        = p1.LogoWidth;
                obj.LogoHeight       = p1.LogoHeight;
                obj.LogoBottomMargin = p1.LogoBottomMargin;
                obj.BackgroundImage  = p1.BackgroundImage;
                obj.Position         = p1.Position;
                obj.ForgotPassLink   = p1.ForgotPassLink;
                obj.BackToHomeLink   = p1.BackToHomeLink;
            }
            else
            {
                obj.LoginPageLogo    = "";
                obj.LogoWidth        = "";
                obj.LogoHeight       = "";
                obj.LogoBottomMargin = "";
                obj.BackgroundImage  = "";
                obj.Position         = "";
                obj.ForgotPassLink   = "";
                obj.BackToHomeLink   = "";
            }

            var p2 = dc.tblSocialMediaSettingMasters.Find(CompanyID);

            if (p2 != null)
            {
                obj.WhatsApp  = p2.WhatsApp;
                obj.FaceBook  = p2.FaceBook;
                obj.InstaGram = p2.InstaGram;
                obj.LinkedIn  = p2.LinkedIn;
                obj.Twitter   = p2.Twitter;
                obj.Twitter   = p2.Twitter;
                obj.Youtube   = p2.Youtube;
            }
            else
            {
                obj.WhatsApp  = "";
                obj.FaceBook  = "";
                obj.InstaGram = "";
                obj.LinkedIn  = "";
                obj.Twitter   = "";
                obj.Youtube   = "";
            }

            var p3 = dc.tblContactSettingMasters.Find(CompanyID);

            if (p3 != null)
            {
                obj.StreetAddress1 = p3.StreetAddress1;
                obj.StreetAddress2 = p3.StreetAddress2;
                obj.City           = p3.City;
                obj.State          = p3.State;
                obj.Zip            = Convert.ToInt32(p3.Zip);
                obj.WorkPhone      = p3.WorkPhone;
                obj.MobileNo       = p3.MobileNo;
                obj.Location       = p3.Location;

                obj.StreetAddress1_1 = p3.StreetAddress1_1;
                obj.StreetAddress2_1 = p3.StreetAddress2_1;
                obj.City_1           = p3.City_1;
                obj.State_1          = p3.State_1;
                obj.Zip_1            = Convert.ToInt32(p3.Zip_1);
                obj.WorkPhone_1      = p3.WorkPhone_1;
                obj.MobileNo_1       = p3.MobileNo_1;
                obj.Location_1       = p3.Location_1;

                obj.StreetAddress1_2 = p3.StreetAddress1_2;
                obj.StreetAddress2_2 = p3.StreetAddress2_2;
                obj.City_2           = p3.City_2;
                obj.State_2          = p3.State_2;
                obj.Zip_2            = Convert.ToInt32(p3.Zip_2);
                obj.WorkPhone_2      = p3.WorkPhone_2;
                obj.MobileNo_2       = p3.MobileNo_2;
                obj.Location_2       = p3.Location_2;
            }
            else
            {
                obj.StreetAddress1 = "";
                obj.StreetAddress2 = "";
                obj.City           = "";
                obj.State          = "";
                obj.Zip            = 0;
                obj.WorkPhone      = "";
                obj.MobileNo       = "";
                obj.Location       = "";

                obj.StreetAddress1_1 = "";
                obj.StreetAddress2_1 = "";
                obj.City_1           = "";
                obj.State_1          = "";
                obj.Zip_1            = 0;
                obj.WorkPhone_1      = "";
                obj.MobileNo_1       = "";
                obj.Location_1       = "";

                obj.StreetAddress1_2 = "";
                obj.StreetAddress2_2 = "";
                obj.City_2           = "";
                obj.State_2          = "";
                obj.Zip_2            = 0;
                obj.WorkPhone_2      = "";
                obj.MobileNo_2       = "";
                obj.Location_2       = "";
            }

            GetTimeZone();
            GetDateTimeFormat();
            GetWeekDays();
            return(View(obj));
        }