protected bool ValidaUser() { try { using (DroidikaContextDataContext dbContext = new DroidikaContextDataContext()) { dAdministrator admin = dbContext.dAdministrators.Where(x => x.email == txtUsr.Text && x.password == txtPwd.Text).SingleOrDefault(); if (admin == null) { LabelMsg.Text = "Usuario incorrecto"; Session["Name"] = ""; } else { Session["Name"] = admin.fstName + " " + admin.lstName; Session["ID"] = admin.id; Session["Login"] = true; txtUsr.Text = ""; txtPwd.Text = ""; LabelMsg.Visible = true; LabelMsg.Text = ""; Response.Redirect("Drones.aspx"); } } } catch (Exception ex) { LabelMsg.Visible = true; LabelMsg.Text = ex.Message; } return(true); }
public static Administrators Update(Administrators administrators) { dAdministrator _dAdministrator = new dAdministrator(); if (Convert.ToBoolean(ConfigurationSettings.AppSettings["IsEmailEnable"])) { string mailBody = MailHelper.ActivityMail("Administrator", "Administrator Updation done on " + administrators.EmailId + "( " + administrators.Administrators_Id + " and " + administrators.AdminCode + " ) successfully.", 1, DateTime.Now.ToString()); MailHelper.SendEmail(MailHelper.EmailToSend(), "Administrator Updation", mailBody, "Rachna Teracotta : Activity Admin"); } return(_dAdministrator.Update(administrators)); }
public static List <AdminActivity> ListActivityByAdmin(int adminId) { dAdministrator _dAdministrator = new dAdministrator(); return(_dAdministrator.ListActivityByAdmin(adminId)); }
public static List <AdminActivity> ListActivity() { dAdministrator _dAdministrator = new dAdministrator(); return(_dAdministrator.ListActivity()); }
public static AdminActivity Create(AdminActivity adminActivity) { dAdministrator _dAdministrator = new dAdministrator(); return(_dAdministrator.CreateActivity(adminActivity)); }
public static List <AdminChatting> ListChatMessage() { dAdministrator _dAdministrator = new dAdministrator(); return(_dAdministrator.ListChatMessage()); }
public static int CreateChatMessage(AdminChatting adminChatting) { dAdministrator _dAdministrator = new dAdministrator(); return(_dAdministrator.CreateChatMessage(adminChatting)); }
public static List <EmailTracker> ListEmailTracker() { dAdministrator _dAdministrator = new dAdministrator(); return(_dAdministrator.ListEmailTracker()); }
public static List <Administrators> List() { dAdministrator _dAdministrator = new dAdministrator(); return(_dAdministrator.List()); }
public static EmailTracker CreateEmailTracker(EmailTracker EmailTracker) { dAdministrator _dAdministrator = new dAdministrator(); return(_dAdministrator.CreateEmailTracker(EmailTracker)); }