Exemplo n.º 1
0
        private void btn_Tat3eemAll_Click(object sender, EventArgs e)
        {
            string tsi = "";

            foreach (DataGridViewRow r in dgv.Rows)
            {
                if (Convert.ToBoolean(r.Cells["OK"].Value) == true)
                {
                    tsi += "," + r.Cells["Tat3eemShowID"].Value.ToString();
                }
            }

            if (tsi == "")
            {
                MessageBox.Show("يجب أختيار تطعيمات", "تطعيم", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                return;
            }
            else
            {
                tsi = " Where Tat3eemShowID IN (" + tsi.Substring(1) + ") And WithoutItem = 0";
            }

            DataTable dt = new DataTable();

            dt = g.Select2("Select * From AlarmShow_Select " + tsi);

            if (dt.Rows.Count == 0)
            {
                MessageBox.Show("التنبيهات المحددة بدون صنف محدد بالإعدادات الخاصة بها لكي يتم توجيهها إلى شاشة التطعيم", "تطعيم", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                return;
            }
            else
            {
                PL.Store.Tat3eemWithdraw t = new Store.Tat3eemWithdraw();
                t.AlarmShow      = this;
                t.lbl_AlarmCount = lbl_AlarmCount;
                t.UserID         = UserID;
                t.mode           = "New";
                t.dt             = dt;

                t.Location = new Point(Location.X + ((Width / 2) - t.Width / 2), Location.Y + 7);
                t.frm_Main = frm_Main;
                t.Show();
                Hide();
            }
        }
Exemplo n.º 2
0
        void btn_Tat3eemWithdraw_Click(object sender, EventArgs e)
        {
            PL.Store.Tat3eemWithdraw t = new Store.Tat3eemWithdraw();
            t.AlarmShow      = AlarmShow;
            t.lbl_AlarmCount = lbl_AlarmCount;
            t.frm_Main       = this;

            if (WindowState != FormWindowState.Maximized)
            {
                t.StartPosition = FormStartPosition.Manual;
                t.Location      = new Point(Location.X + ((Width / 2) - t.Width / 2), Location.Y + 7);
            }
            else
            {
                t.StartPosition = FormStartPosition.CenterScreen;
            }

            t.Show();
        }