Example #1
0
        void FetchEmpEmail()
        {
            connectionManger = new ConnectionManger();
            string QueryForEmpEmail = "select EmpPassword from AspNetUsers where UserName =('" + ddlEmpName.SelectedItem.Text + "')";

            connectionManger.ForEmpEmail(QueryForEmpEmail);
            EmpPassword = connectionManger.EmpPassword;
        }
Example #2
0
        //protected void btnAdd_Click(object sender, EventArgs e)
        //{
        //    Insert();
        //}
        void FetchManagerEmail()
        {
            connectionManger = new ConnectionManger();
            string QueryForManagerEmail = "select Manager.Email, Manager.Password from Manager join Department on Department.DeptId = Manager.DepartmentId where DeptId =('" + ddlDeptID.SelectedItem + "')";

            //connectionManger.ForManagerEmail(QueryForManagerEmail);
            //ManagerEmail = connectionManger.ManagerEmail;
            ManagerEmail = connectionManger.Selection(QueryForManagerEmail);
        }
Example #3
0
        protected void ddlCanteen_SelectedIndexChanged(object sender, EventArgs e)
        {
            connectionManger = new ConnectionManger();
            string  QueryForCascading = "SELECT Item.ItemId, Item.ItemName from Item join CanteenItems on Item.ItemId = CanteenItems.ItemId join Canteen on Canteen.CanteenId = CanteenItems.CanteenId where Canteen.CanteenId=" + ddlCanteen.SelectedValue;
            DataSet dataSet           = connectionManger.Fill(QueryForCascading);

            if (dataSet.Tables[0].Rows.Count > 0)
            {
                ddlMealType.DataSource     = dataSet.Tables[0];
                ddlMealType.DataTextField  = "ItemName";
                ddlMealType.DataValueField = "ItemId";
                ddlMealType.DataBind();
                ddlMealType.Items.Insert(0, "--Select--");
            }
        }
Example #4
0
        protected void ddlLocation_SelectedIndexChanged(object sender, EventArgs e)
        {
            connectionManger = new ConnectionManger();
            string  QueryForCascading = "SELECT CanteenId, CanteenName FROM Canteen WHERE LocationId =" + ddlLocation.SelectedValue;
            DataSet dataSet           = connectionManger.Fill(QueryForCascading);

            if (dataSet.Tables[0].Rows.Count > 0)
            {
                ddlCanteen.DataSource     = dataSet.Tables[0];
                ddlCanteen.DataTextField  = "CanteenName";
                ddlCanteen.DataValueField = "CanteenId";
                ddlCanteen.DataBind();
                ddlCanteen.Items.Insert(0, "--Select--");
            }
        }
Example #5
0
        void AutoFillForDepart()
        {
            connectionManger = new ConnectionManger();
            String  QueryForAutoFillingDepartment = "select DeptName, DeptId from Department";
            DataSet dataSet = connectionManger.Fill(QueryForAutoFillingDepartment);

            if (dataSet.Tables[0].Rows.Count > 0)
            {
                ddlDeptID.DataSource     = dataSet.Tables[0];
                ddlDeptID.DataTextField  = "DeptId";
                ddlDeptID.DataValueField = "DeptName";
                ddlDeptID.DataBind();
                ddlDeptID.Items.Insert(0, "--Select--");
            }
        }
Example #6
0
        void AutoFillIteam()
        {
            connectionManger = new ConnectionManger();
            string  QueryForAutoFillingItem = "SELECT ItemId, ItemName FROM Item where ItemName = 'Snacks'";
            DataSet dataSet = connectionManger.Fill(QueryForAutoFillingItem);

            if (dataSet.Tables[0].Rows.Count > 0)
            {
                ddlItemName.DataSource     = dataSet.Tables[0];
                ddlItemName.DataTextField  = "ItemName";
                ddlItemName.DataValueField = "ItemId";
                ddlItemName.DataBind();
                ddlItemName.Items.Insert(0, "--Select--");
            }
        }
Example #7
0
        private void AutoFillLoc()
        {
            connectionManger = new ConnectionManger();
            string  QueryForAutoFillingLoc = "SELECT LocationId, LocationName FROM Location";
            DataSet dataSet = connectionManger.Fill(QueryForAutoFillingLoc);

            if (dataSet.Tables[0].Rows.Count > 0)
            {
                ddlLocation.DataSource     = dataSet.Tables[0];
                ddlLocation.DataTextField  = "LocationName";
                ddlLocation.DataValueField = "LocationId";
                ddlLocation.DataBind();
                ddlLocation.Items.Insert(0, "--Select--");
            }
        }