Exemplo n.º 1
0
 private void button1_Click(object sender, EventArgs e)
 {
     try
     {
         InputData_DTO.ProjectModels.Category cate = new Category();
         cate.ID           = Guid.NewGuid();
         cate.Name         = txtname.Text;
         cate.CreatedDate  = createdate.Value;
         cate.CreatedBy    = a;
         cate.ModifiedDate = modifydate.Value;
         cate.Modifedby    = a;
         cate.Filter       = Convert.ToInt32(txtfilter.Text);
         cate.HtmlIcon     = txthtmlcode.Text;
         if (status.SelectedIndex == 0)
         {
             cate.IsStatus = true;
         }
         else
         {
             cate.IsStatus = false;
         }
         bool check = new InputData_BUS.Menu.CategoryServices {
         }.Create(cate);
         if (check == true)
         {
             services.Input_Successful();
             lb_newid.Text = cate.ID.ToString();
         }
     }
     catch
     {
         services.ErrorWhileProcessing();
     }
 }
Exemplo n.º 2
0
        private void button4_Click(object sender, EventArgs e)
        {
            List <InputData_DTO.ProjectModels.Category> list = new InputData_BUS.Menu.CategoryServices {
            }.GetAllData();

            gridview.DataSource = list;
        }