public String SiteChange(String SITEID) { if (Session["Login"] != null) { LoginSession loginsession = (LoginSession)Session["Login"]; if (SITEID != null) { SiteInfo site = new SiteInfo(); site.SiteID = Convert.ToInt64(SITEID); loginsession.SiteID = SITEID; loginsession.ClientID = site.GetSiteClientID().ToString(); Session["Login"] = loginsession; return "true"; } else { return "false"; } } else { RedirectToAction("Index", "Home"); return "false"; } }
// Mapping Insert -------------------------------- Boolean IRecordInsert.AddRecord(Object loggerobj) { bool flag = false; SiteInloggerClass logger = (SiteInloggerClass)loggerobj; try { SiteInLogger _logger = new SiteInLogger(); if (logger.SiteID != null) { _logger.SiteID = logger.SiteID; } if (logger.LoggerId != null) { _logger.LoggerID = logger.LoggerId; } if (logger.CommunicationID != null) { _logger.CommunicationID = logger.CommunicationID; } if (logger.AssignDate != null) { _logger.StartDate = Common.DateGB(logger.AssignDate); } if (logger.SiteID != null) { SiteInfo siteinfo = new SiteInfo(); siteinfo.SiteID = Convert.ToInt64(logger.SiteID); _logger.ClientID = siteinfo.GetSiteClientID(); } _logger.CreateBy = logger.CreateBy; _logger.CreateDate = DateTime.Now; _logger.EntryDate = DateTime.Now; if ((_logger.SiteID != null) && (_logger.LoggerID != null) && (_logger.CommunicationID != null)) { flag = DAL.DALSite.CreateSiteInLogger(_logger); } } catch (Exception ex) { throw; } return flag; }