Example #1
0
 private void mAddNewCategory_Click(object sender, EventArgs e)
 {
     using (frmAddName frm = new frmAddName())
     {
         if (frm.ShowDialog() == DialogResult.OK)
         {
             if (!string.IsNullOrEmpty(frm.Tag.ToString()) && _CurrentCategory != null)
             {
                 if (FwkMembership.ExistCategory(frm.Tag.ToString().Trim(), Convert.ToInt32(_CurrentCategory.Id), frmAdmin.Provider.Name))
                 {
                     MessageViewInfo.Show(string.Format("Category {0} already exist", frm.Tag.ToString()));
                     return;
                 }
                 else
                 {
                     Create_Categoty(frm.Tag.ToString());
                 }
             }
         }
     }
 }
Example #2
0
 private void addRootcategoryToolStripMenuItem_Click(object sender, EventArgs e)
 {
     using (frmAddName frm = new frmAddName())
     {
         if (frm.ShowDialog() == DialogResult.OK)
         {
             if (!string.IsNullOrEmpty(frm.Tag.ToString()))
             {
                 if (FwkMembership.ExistCategory(frm.Tag.ToString().Trim(), 0, frmAdmin.Provider.Name))
                 {
                     MessageViewInfo.Show(string.Format("Category {0} already exist", frm.Tag.ToString()));
                     return;
                 }
                 else
                 {
                     _CurrentCategory = null;
                     Create_Categoty(frm.Tag.ToString());
                 }
             }
         }
     }
 }
Example #3
0
 private void addRootcategoryToolStripMenuItem_Click(object sender, EventArgs e)
 {
     using (frmAddName frm = new frmAddName())
     {
         if (frm.ShowDialog() == DialogResult.OK)
         {
             if (!string.IsNullOrEmpty(frm.Tag.ToString()))
                 if (FwkMembership.ExistCategory(frm.Tag.ToString().Trim(), 0, frmAdmin.Provider.Name))
                 {
                     MessageViewInfo.Show(string.Format("Category {0} already exist", frm.Tag.ToString()));
                     return;
                 }
                 else
                 {
                     _CurrentCategory = null;
                     Create_Categoty(frm.Tag.ToString());
                 }
         }
     }
 }
Example #4
0
        private void mAddNewCategory_Click(object sender, EventArgs e)
        {
            using (frmAddName frm = new frmAddName())
            {
                if (frm.ShowDialog() == DialogResult.OK)
                {
                    if (!string.IsNullOrEmpty(frm.Tag.ToString()) && _CurrentCategory != null)
                        if (FwkMembership.ExistCategory(frm.Tag.ToString().Trim(), Convert.ToInt32(_CurrentCategory.Id), frmAdmin.Provider.Name))
                        {
                            MessageViewInfo.Show(string.Format("Category {0} already exist", frm.Tag.ToString()));
                            return;
                        }
                        else
                            Create_Categoty(frm.Tag.ToString());
                }
            }


        }