public PriceCalc() { InitializeComponent(); SLDataDB.LoadData(queryOrd, out Orders); SLDataDB.LoadData(queryClnt, out Clients); ClntListLd(); }
public ManagersW() { InitializeComponent(); SLDataDB.LoadData(queryMng, out MngrsIsh); Mng = MngrsIsh.Copy(); UnXor(); }
private void Upd() { SLDataDB.LoadData(queryOrd, out Orders); SLDataDB.LoadData(queryMng, out Managers); SLDataDB.LoadData(queryClnt, out Clients); SLDataDB.LoadData(queryArchive, out Archive); }
private void UpdInfo() { SLDataDB.LoadData(queryOrd, out Orders); SLDataDB.LoadData(queryMng, out Managers); SLDataDB.LoadData(queryClnt, out Clients); ManagerBx.Items.Clear(); ClientsBx.Items.Clear(); for (int i = 0; i < Managers.Rows.Count; i++) { ManagerBx.Items.Add(Managers.Rows[i][1]); } for (int i = 0; i < Clients.Rows.Count; i++) { ClientsBx.Items.Add(Clients.Rows[i][1]); } }
public Manager() { int p = 0; MngID = Authorization.MngID; InitializeComponent(); SLDataDB.LoadData(query, out Orders); SLDataDB.LoadData(queryClnts, out Clients); OrdersId = new int[Orders.Rows.Count]; for (int i = 0; i < Orders.Rows.Count; i++) { if (MngID == Convert.ToInt32(Orders.Rows[i][5])) { NumbersOrd.Text += Orders.Rows[i][0] + "\n"; OrdersId[p] = Convert.ToInt32(Orders.Rows[i][0]); p++; } } }
public Arhve() { InitializeComponent(); SLDataDB.LoadData(queryArch, out Archive); dGV1.DataSource = Archive; }
public Clients() { InitializeComponent(); SLDataDB.LoadData(queryClnt, out Clnts); dGV1.DataSource = Clnts; }
public ChangePassword() { InitializeComponent(); SLDataDB.LoadData(queryOrd, out Admins); }
public Services() { InitializeComponent(); SLDataDB.LoadData(queryClnt, out Svcs); dGV1.DataSource = Svcs; }
public SvcManager() { InitializeComponent(); SLDataDB.LoadData(queryClnt, out Svcs); dataGridView1.DataSource = Svcs; }
private void Auth_Click(object sender, EventArgs e) { if (Log.Text != "") { DataTable Table = new DataTable(); if (Log.Text == "Администратор" || Log.Text == "Начальник отдела") { string pss; string query = "SELECT * FROM Admins ORDER BY id"; string chkpas = Pass.Text; SLDataDB.LoadData(query, out Table); int p; bool chk = false; switch (Log.Text) { case "Администратор": { p = 0; pss = Convert.ToString(Table.Rows[p][2]); PasCheck(chkpas, pss, out chk); if (chk) { this.Hide(); Admin g = new Admin(); g.ShowDialog(); this.Close(); } } break; case "Начальник отдела": { p = 1; pss = Convert.ToString(Table.Rows[p][2]); PasCheck(chkpas, pss, out chk); if (chk) { this.Hide(); Head_of_Dep g = new Head_of_Dep(); g.ShowDialog(); this.Close(); } } break; } } else { if (Log.Text != "") { string pss = ""; string query = "SELECT * FROM Managers ORDER BY Id"; string chkpas = Pass.Text; SLDataDB.LoadData(query, out Table); bool chk = false; int p = 0; for (int i = 0; i < Table.Rows.Count; i++) { string LT = Log.Text; string BDSrnm = Convert.ToString(Table.Rows[i][1]); for (int k = 0; k < LT.Length; k++) { if (LT[k] == BDSrnm[k]) { chk = true; } else { chk = false; break; } } if (chk) { pss = Convert.ToString(Table.Rows[i][3]); p = i; break; } } if (chk == false) { WrongPass g = new WrongPass(); g.ShowDialog(); } if (chk) { PasCheck(chkpas, pss, out chk); } ; if (chk) { MngID = Convert.ToInt32(Table.Rows[p][0]); this.Hide(); Manager g = new Manager(); g.ShowDialog(); this.Close(); } } } } }