Esempio n. 1
0
 private void BTN_SAVE_Click(object sender, EventArgs e)
 {
     if (TXT_MP_NAME.Text == string.Empty)
     {
         TXT_MP_NAME.Focus();
         MSGBOX mdg = new MSGBOX(MessageAlertHeder.Warning(), "PLEASE ENTER MEAL PLAN NAME", MessageAlertImage.Warning());
         mdg.ShowDialog();
     }
     else
     {
         if (BTN_SAVE.Text == "SAVE")
         {
             string result = SAVE_MEAL_PLAN();
             if (result == "done")
             {
                 MSGBOX mdg = new MSGBOX(MessageAlertHeder.Success(), "MEAL PLAN ADDED SUCCESSFULLY!", MessageAlertImage.Success());
                 mdg.ShowDialog();
                 DisableControls();
             }
         }
         else
         {
             string result = UPDATE_MEAL_PLAN();
             if (result == "done")
             {
                 MSGBOX mdg = new MSGBOX(MessageAlertHeder.Success(), "PACKAGE DETAILS UPDATED SUCCESSFULLY!", MessageAlertImage.Success());
                 mdg.ShowDialog();
             }
         }
         LOAD_MEAP_PLAN_lIST();
     }
 }
Esempio n. 2
0
 private void Clear()
 {
     LBL_MP_ID.Text = "N/A";
     TXT_MP_NAME.Clear();
     TXT_DESCRIPTION.Clear();
     TXT_ADULT_PRICE.Text = "0.00";
     TXT_CHILD_PRICE.Text = "0.00";
     BTN_SAVE.Text        = "SAVE";
     TXT_MP_NAME.Focus();
 }