public bool updateCustomerGroup(DTO.ST_customer_group customerGroup)
 {
     try
     {
         var updateCustomerGroup = db.ST_customer_groups.Where(p => p.customer_group_id.Equals(customerGroup.customer_group_id)).SingleOrDefault();
         updateCustomerGroup.customer_group_name = customerGroup.customer_group_name;
         db.SubmitChanges();
         return(true);
     }
     catch
     {
         return(false);
     }
 }
 public bool insertCustomerGroup(DTO.ST_customer_group customerGroup)
 {
     try
     {
         db.ST_customer_groups.InsertOnSubmit(customerGroup);
         db.SubmitChanges();
         return(true);
     }
     catch (Exception)
     {
         return(false);
     }
     db.ST_customer_groups.InsertOnSubmit(customerGroup);
     db.SubmitChanges();
 }
        private string updateCustomerGroup()
        {
            DTO.ST_customer_group customerGroup = new DTO.ST_customer_group();
            customerGroup.customer_group_id   = customerGroupId;
            customerGroup.customer_group_name = txt_CustomerGroupName.Text;
            bool boolUpdateCustomerGroup = customerGroupBus.updateCustomerGroup(customerGroup);

            if (boolUpdateCustomerGroup == true)
            {
                return("Chĩnh Sửa Thành Công!");
            }
            else
            {
                return("Không Thể Chỉnh Sửa!");
            }
        }
        private string insertCustomerGroup()
        {
            DTO.ST_customer_group customerGroup = new DTO.ST_customer_group();

            customerGroup.customer_group_name = txt_CustomerGroupName.Text;
            bool boolInsertCustomerGroup = customerGroupBus.insertCustomerGroup(customerGroup);

            if (boolInsertCustomerGroup == true)
            {
                return("Thêm Mới Thành Công!");

                this.Close();
            }
            else
            {
                return("Không Thể Thêm Mới!");
            }
        }
 public bool insertCustomerGroup(DTO.ST_customer_group customerGroup)
 {
     return(customerGroupDao.insertCustomerGroup(customerGroup));
 }
 public bool updateCustomerGroup(DTO.ST_customer_group customerGroup)
 {
     return(customerGroupDao.updateCustomerGroup(customerGroup));
 }