src/RumahScarlett/RumahScarlett.Presentation/Helper/RoleManager.cs
/// <summary>
/// Isi Button action yang ada di Form ke tabel form_action
/// </summary>
/// <param name="form">Form target</param>
Isi Button action yang ada di Form ke tabel form_action
Isi Button action yang ada di Form ke tabel form_action
private void PopulateButtonFormToFormAction(Form form)
      {
         var formAction = new FormActionModel();
         formAction.form_name = form.Name;
         formAction.form_text = form.Text;
         foreach (Control ctrl in form.Controls)
         {
            PopulateButtonToRoleDetail(form, formAction, ctrl);
         }
         _colActNo = 0;
         form.Dispose();
         _formActionServices.Insert(formAction);
      }
private void PopulateButtonFormToFormAction ( Form form ) { var formAction = new FormActionModel ( ) ; formAction . form_name = form . Name ; formAction . form_text = form . Text ; foreach ( Control ctrl in form . Controls ) { PopulateButtonToRoleDetail ( form , formAction , ctrl ) ; } _colActNo = 0 ; form . Dispose ( ) ; _formActionServices . Insert ( formAction ) ; }
Isi Button action yang ada di Form ke tabel form_action
Isi Button action yang ada di Form ke tabel form_action
// Buat object FormAction dari Form tersebut // Looping setiap Control yang bertipe Button pada Form // Reset nilai kolom act dan dispose object Form // Simpan data Form ke tabel form_action
form
Form
None