Пример #1
0
 //=============================BUTTON CLOSE==================================
 private void b_close_Click(object sender, EventArgs e)
 {
     //CEK STATUS TERAKHIR DARI TABEL CLOSING STORE
     cek_status_Cstore();
     //JIKA STATUS 0, MAKA KASIH HAK AKSES (MASUK KE MENU CLOSING STORE)|| JIKA STATUS ADALAH 1 MAKA JGN BERI HAK AKSES
     if (status_store == "0")
     {
         //MEMBERI TULISAN CLOSING STORE KE LABEL 3 DI FORM 1
         f1.label3.Text      = "Closing Store";
         f1.status_buka_menu = "1";
         DateTime mydate = DateTime.Now;
         date = mydate.ToString("yyyy-MM-dd");
         UC_Closing_Store c = new UC_Closing_Store(f1);
         f1.p_kanan.Controls.Clear();
         if (!f1.p_kanan.Controls.Contains(UC_Closing_Store.Instance))
         {
             f1.p_kanan.Controls.Add(UC_Closing_Store.Instance);
             UC_Closing_Store.Instance.Dock = DockStyle.Fill;
             UC_Closing_Store.Instance.set_name(id_epy, nm_epy);
             UC_Closing_Store.Instance.get_id_close();
             UC_Closing_Store.Instance.from_form1();
             UC_Closing_Store.Instance.total_trans();
             UC_Closing_Store.Instance.BringToFront();
         }
     }
     else
     {
         MessageBox.Show("Please Open Shift First");
     }
 }
Пример #2
0
 //==================BUTTON CLOSING STORE==========================
 private void bunifuFlatButton3_Click(object sender, EventArgs e)
 {
     //Jika POS tersebut bukan PC Master maka menu ini tidak bisa diakses
     if (Properties.Settings.Default.MstrOrChld == "Child")
     {
         MessageBox.Show("This Menu Can Only Be Accessed By A Master PCss", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
     else
     {
         label3.Text = "Closing Store";
         date        = mydate.ToString("yyyy-MM-dd");
         UC_Closing_Store c = new UC_Closing_Store(this);
         p_kanan.Controls.Clear();
         if (!p_kanan.Controls.Contains(UC_Closing_Store.Instance))
         {
             p_kanan.Controls.Add(UC_Closing_Store.Instance);
             UC_Closing_Store.Instance.Dock = DockStyle.Fill;
             UC_Closing_Store.Instance.set_name(id_employee, nama_employee);
             UC_Closing_Store.Instance.get_id_close();
             UC_Closing_Store.Instance.from_form1();
             UC_Closing_Store.Instance.total_trans();
             UC_Closing_Store.Instance.BringToFront();
         }
         else
         {
             UC_Closing_Store.Instance.set_name(id_employee, nama_employee);
             UC_Closing_Store.Instance.get_id_close();
             UC_Closing_Store.Instance.from_form1();
             UC_Closing_Store.Instance.total_trans();
             UC_Closing_Store.Instance.BringToFront();
         }
     }
 }