protected void btnUpdate_Click(object sender, EventArgs e)
        {
            string    refString         = "";
            int       adminUserId       = Convert.ToInt32(hfUpdateAdminId.Value);
            AdminUser adminUserToUpdate = GenericBS <AdminUser> .GetSingleItemByCriteria(x => x.Id == adminUserId);

            adminUserToUpdate.FullName = txtAdminFullNameUpdate.Text;
            adminUserToUpdate.UserName = txtAdminUsernameUpdate.Text;
            adminUserToUpdate.Password = txtAdminPasswordUpdate.Text;
            adminUserToUpdate.Email    = txtAdminEmailUpdate.Text;
            adminUserToUpdate.Job      = txtAdminJobUpdate.Text;

            string filePath = SavePhoto(ref refString);

            if (refString != "")
            {
                NotificationMessage.Error(divMessage, refString);
                return;
            }
            else
            {
                adminUserToUpdate.Photo = filePath;
                GenericBS <AdminUser> .Update(adminUserToUpdate);

                GetAdminUser();
            }



            //kaydet butonuna basınçda admin menü eklerken aynı anda left menüdede gözükmesi için
            //(Page.Master.FindControl("LeftMenu") as LeftMenu).GetLeftMainAdminMenus();

            NotificationMessage.Success(divMessage, "Yeni Menü Başarı İle Güncellendi");
        }
Beispiel #2
0
        protected void btnUpdate_Click(object sender, EventArgs e)
        {
            int       adminMenuId       = Convert.ToInt32(hfUpdateAdminMenuId.Value);
            AdminMenu adminMenuToUpdate = GenericBS <AdminMenu> .GetSingleItemByCriteria(x => x.Id == adminMenuId);

            adminMenuToUpdate.Name     = txtNameUpdate.Text;
            adminMenuToUpdate.Link     = txtLinkUpdate.Text;
            adminMenuToUpdate.MenuIcon = "fa fa-" + ddlMenuIconUpdate.SelectedItem.ToString();
            //top menuye bak
            if (!chkTopMenuUpdate.Checked)
            {
                adminMenuToUpdate.TopMenuId = null;
            }
            else
            {
                adminMenuToUpdate.TopMenuId = Convert.ToInt32(ddlTopMenuUpdate.SelectedValue);
            }

            GenericBS <AdminMenu> .Update(adminMenuToUpdate);

            GetAdminMenus();


            //kaydet butonuna basınçda admin menü eklerken aynı anda left menüdede gözükmesi için
            (Page.Master.FindControl("LeftMenu") as LeftMenu).GetLeftMainAdminMenus();

            NotificationMessage.Success(divMessage, "Yeni Menü Başarı İle Güncellendi");
        }
        protected void lnkDeleteAdminUser_Click(object sender, EventArgs e)
        {
            int       adminUserId     = Convert.ToInt32(hfAdminUserId.Value);
            AdminUser adminUserDelete = GenericBS <AdminUser> .GetSingleItemByCriteria(x => x.Id == adminUserId);

            // silme işlemi
            //  GenericBS<AdminMenu>.Delete(adminMenuDelete);

            adminUserDelete.IsActive = false;
            GenericBS <AdminUser> .Update(adminUserDelete);

            GetAdminUser();
            NotificationMessage.Warning(divMessage, "Başarıyla Silindi");
        }
        protected void lnkApprove_Click(object sender, EventArgs e)
        {
            int       blogId      = Convert.ToInt32(hfBlogIdApprove.Value);
            BlogEntry blogApprove = GenericBS <BlogEntry> .GetSingleItemByCriteria(x => x.Id == blogId);

            // silme işlemi
            //  GenericBS<AdminMenu>.Delete(adminMenuDelete);

            blogApprove.IsActive = true;
            GenericBS <BlogEntry> .Update(blogApprove);

            GetBlogEntry();
            NotificationMessage.Success(divMessage, "Başarıyla Onaylandı");
        }
        protected void lnkDeleteUser_Click(object sender, EventArgs e)
        {
            int       blogId     = Convert.ToInt32(hfBlogId.Value);
            BlogEntry blogDelete = GenericBS <BlogEntry> .GetSingleItemByCriteria(x => x.Id == blogId);

            // silme işlemi
            //  GenericBS<AdminMenu>.Delete(adminMenuDelete);

            blogDelete.IsActive = false;
            GenericBS <BlogEntry> .Update(blogDelete);

            GetBlogEntry();
            NotificationMessage.Warning(divMessage, "Başarıyla Silindi");
        }
Beispiel #6
0
        protected void lnkApprove_Click(object sender, EventArgs e)
        {
            int  userId     = Convert.ToInt32(hfUserIdApprove.Value);
            User UserDelete = GenericBS <User> .GetSingleItemByCriteria(x => x.Id == userId);

            // silme işlemi
            //  GenericBS<AdminMenu>.Delete(adminMenuDelete);

            UserDelete.IsActive = true;
            GenericBS <User> .Update(UserDelete);

            GetUser();
            NotificationMessage.Success(divMessage, "Başarıyla Onaylandı");
        }
Beispiel #7
0
        protected void btnDeleteAdminMenu_Click(object sender, EventArgs e)
        {
            int       adminMenuId     = Convert.ToInt32(hfAdminMenuId.Value);
            AdminMenu adminMenuDelete = GenericBS <AdminMenu> .GetSingleItemByCriteria(x => x.Id == adminMenuId);

            // silme işlemi
            //  GenericBS<AdminMenu>.Delete(adminMenuDelete);

            adminMenuDelete.IsActive = false;
            GenericBS <AdminMenu> .Update(adminMenuDelete);

            NotificationMessage.Warning(divMessage, "Başarıyla Silindi");
            GetAdminMenus();
            (Page.Master.FindControl("LeftMenu") as LeftMenu).GetLeftMainAdminMenus();
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                Guid code = Guid.Parse(Request.QueryString["Code"]);
                User user = GenericBS <User> .GetSingleItemByCriteria(x => x.ActivationCode == code);

                if (user != null)
                {
                    user.IsMailConfirmed = true;
                    GenericBS <User> .Update(user);

                    NotificationMessage.Error(divMessage, "Aktivasyon Başarılı.Yönetici onayından sonra giriş yapabilirsiniz.");
                }
                else
                {
                    NotificationMessage.Error(divMessage, "Aktivasyon Başarısız.Lütfen maildeki linke tıklayın.");
                }
            }
        }