コード例 #1
0
 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);
 }
コード例 #2
0
        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));
        }
コード例 #3
0
        public static List <AdminActivity> ListActivityByAdmin(int adminId)
        {
            dAdministrator _dAdministrator = new dAdministrator();

            return(_dAdministrator.ListActivityByAdmin(adminId));
        }
コード例 #4
0
        public static List <AdminActivity> ListActivity()
        {
            dAdministrator _dAdministrator = new dAdministrator();

            return(_dAdministrator.ListActivity());
        }
コード例 #5
0
        public static AdminActivity Create(AdminActivity adminActivity)
        {
            dAdministrator _dAdministrator = new dAdministrator();

            return(_dAdministrator.CreateActivity(adminActivity));
        }
コード例 #6
0
        public static List <AdminChatting> ListChatMessage()
        {
            dAdministrator _dAdministrator = new dAdministrator();

            return(_dAdministrator.ListChatMessage());
        }
コード例 #7
0
        public static int CreateChatMessage(AdminChatting adminChatting)
        {
            dAdministrator _dAdministrator = new dAdministrator();

            return(_dAdministrator.CreateChatMessage(adminChatting));
        }
コード例 #8
0
        public static List <EmailTracker> ListEmailTracker()
        {
            dAdministrator _dAdministrator = new dAdministrator();

            return(_dAdministrator.ListEmailTracker());
        }
コード例 #9
0
        public static List <Administrators> List()
        {
            dAdministrator _dAdministrator = new dAdministrator();

            return(_dAdministrator.List());
        }
コード例 #10
0
        public static EmailTracker CreateEmailTracker(EmailTracker EmailTracker)
        {
            dAdministrator _dAdministrator = new dAdministrator();

            return(_dAdministrator.CreateEmailTracker(EmailTracker));
        }