private void btnSave_Click(object sender, EventArgs e)
 {
     PermissionGroupEntity group = new PermissionGroupEntity();
     group.OID = hdfGroupID.Value;
     group.CUSER = AppCenter.CurrentPersonAccount;
     group.MUSER = AppCenter.CurrentPersonAccount;
     group.GroupCode = txtGroupCode.Text.Trim();
     group.GroupName = txtGroupName.Text.Trim();
     group.GroupStatus = Convert.ToInt32(drpGroupStatus.SelectedValue);
     group.MEMO = txtGroupMemo.Text.Trim();
     bool retValue = true;
     if (string.IsNullOrEmpty(group.OID))
     {
         group.OID = Guid.NewGuid().ToString();
         retValue = new PermissionGroupController().InsertGroup(group);
     }
     else
     {
         retValue = new PermissionGroupController().UpdateGroup(group);
     }
     if (retValue)
     {
         hdfFlag.Value = "1";
         base.ShowMessage(CommonMessage.SaveSuccess);
     }
     else
     {
         base.ShowMessage(CommonMessage.SaveFailed);
     }
 }
 private void BindGrid(int pageIndex)
 {
     PermissionGroupController controller = new PermissionGroupController();
     int rowCount = 0;
     DataSet dst = controller.QueryGroupPermissions(pageIndex, 10, out rowCount, this.txtGroupCode.Text.Trim(), this.txtGroupName.Text.Trim());
     this.Navigator.TotalCount = rowCount;
     this.gvPerson.DataSource = dst.Tables[0];
     this.gvPerson.DataBind();
 }
 private void BindControls()
 {
     PermissionGroupEntity person = new PermissionGroupController().GetGroupInfo(this.hdfGroupID.Value);
     if (person != null)
     {
         txtGroupCode.Text = person.GroupCode;
         txtGroupName.Text = person.GroupName;
         drpGroupStatus.SelectedValue = person.GroupStatus.ToString();
         txtGroupMemo.Text = person.MEMO;
     }
 }