Ejemplo n.º 1
0
 private void LiveSaveInfo()
 {
     if (LiveFormIsValid())
     {
         myR             = new RoleInfo();
         myR.RoleID      = txtRoleID.Text.Trim();
         myR.Description = txtDescription.Text.Trim();
         if (EditFlag)
         {
             myR.RoleID    = lblID.Text.Trim();
             myR.NewRoleID = txtRoleID.Text.Trim();
             if ((Interactive.LInfoConfirm("Are you sure you want to Edit ?", "") == DialogResult.Yes))
             {
                 if (myR.Edit())
                 {
                     Interactive.LInfo("Information saved successfully", "");
                     LiveLoad();
                 }
             }
         }
         else
         {
             if (myR.Add())
             {
                 Interactive.LInfo("Information saved successfully", "");
                 LiveLoad();
             }
         }
     }
     else
     {
         Interactive.LInfoError(err, string.Empty);
     }
 }