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 = ""; } }
public FrmOwnerCatagory(FrmOwnerProduct ownerProduct) : this() { this.OwnerProduct = ownerProduct; }
public FrmOwnerChangeOwnership(FrmOwnerProduct ownerProduct) : this() { this.OwnerProduct = ownerProduct; }
public FrmOwnerEmployee(FrmOwnerProduct ownerProduct) : this() { this.OwnerProduct = ownerProduct; }
public Form1(FrmOwnerProduct ownerProduct) : this() { this.OwnerProduct = ownerProduct; }
public FrmOwnerSellsHistory(FrmOwnerProduct ownerProduct) : this() { this.OwnerProduct = ownerProduct; }