protected void btnChangeGroupSave_Click(object sender, EventArgs e)
        {
            var inventoryGroup = new InventoryGroup
            {
                InventoryGroupId = long.Parse(DDLInvventoryGroups.SelectedValue),
                GroupName = DDLInvventoryGroups.SelectedItem.Text
            };
            foreach (var customer in GetSelectedCustomers())
            {
                if (custInvGroupManager.IsCustomerAlreadyExistInGroup(customer.CustomerNumber,inventoryGroup)== false){
                    customer.InventoryGroupId = inventoryGroup.InventoryGroupId;
                    custInvGroupManager.Save(customer);
                    #region log
                    custInvGroupManager.Identity = (int)customer.RecordNumber;
                    custInvGroupManager.SaveTransactionLog(Permission.PERMITTED_USER, TransactionType.UPDATE);
                    #endregion
                }
            }

            gvCustomerList.DataBind();
        }
        protected void btnSaveUpdate_Click(object sender, EventArgs e)
        {
            var newGroup = new InventoryGroup
            {
                GroupName = txtGroupToUpdate.Text,
                 InventoryGroupId =selectedInventoryGroup.InventoryGroupId
            };

            invGroupManager.Save(newGroup);
            gvInventoryGroups.DataBind();
        }
 private void SaveInventoryGroup()
 {
     if (string.IsNullOrEmpty(txtGroupName.Text))
     {
         return;
     }
     InventoryGroup inventoryGroup = new InventoryGroup
     {
          GroupName = this.txtGroupName.Text
     };
     InvGroupManager.Save(inventoryGroup);
     int inventoryGroupid = InvGroupManager.Identity;
     List<CustomerInventoryGroup> customerInventoryGroups = new List<CustomerInventoryGroup>();
     foreach (var cust_ in CUSTOMERS)
     {
         cust_.InventoryGroupId =inventoryGroupid;
         customerInventoryGroups.Add(cust_);
     }
     foreach (var cig in customerInventoryGroups)
     {
         CustInvGroupManager.Save(cig);
         #region log
         CustInvGroupManager.SaveTransactionLog(Permission.PERMITTED_USER, TransactionType.INSERT);
         #endregion
     }
 }