示例#1
0
        private void btnLogin_Click(object sender, EventArgs e)
        {
            string sql = @"select * from UserTable where Id='" + this.txtLoginId.Text + "' and Password='******';";

            this.Ds = this.Da.ExecuteQuery(sql);

            if (this.Ds.Tables[0].Rows.Count == 1)
            {
                if (this.Ds.Tables[0].Rows[0][4].ToString() == "Owner")
                {
                    this.Hide();
                    FrmOwnerProduct ownerProduct = new FrmOwnerProduct(this);
                    ownerProduct.Visible = true;
                }
                else if (this.Ds.Tables[0].Rows[0][4].ToString() == "Employee")
                {
                    this.Hide();
                    FrmEmployeeSelling employeeSelling = new FrmEmployeeSelling(this);
                    employeeSelling.Visible = true;
                }
            }
            else
            {
                MessageBox.Show("Enter valid id and password");
                txtLoginId.Text       = "";
                txtLoginPassword.Text = "";
            }
        }
示例#2
0
 public FrmOwnerCatagory(FrmOwnerProduct ownerProduct) : this()
 {
     this.OwnerProduct = ownerProduct;
 }
 public FrmOwnerChangeOwnership(FrmOwnerProduct ownerProduct) : this()
 {
     this.OwnerProduct = ownerProduct;
 }
示例#4
0
 public FrmOwnerEmployee(FrmOwnerProduct ownerProduct) : this()
 {
     this.OwnerProduct = ownerProduct;
 }
示例#5
0
 public Form1(FrmOwnerProduct ownerProduct) : this()
 {
     this.OwnerProduct = ownerProduct;
 }
示例#6
0
 public FrmOwnerSellsHistory(FrmOwnerProduct ownerProduct) : this()
 {
     this.OwnerProduct = ownerProduct;
 }