Exemplo n.º 1
0
        void AssignValues()
        {
            forSqlOp          = new ForSqlOp();
            forSqlOp.GName    = txtGuestName.Text;
            forSqlOp.OrgName  = txtOrgName.Text;
            forSqlOp.MobileNo = txtMobileNo.Text;

            forSqlOp.Emp2        = txtEmpName.Text;
            forSqlOp.EmpDeptName = txtDeptName.Text;
            forSqlOp.EmpMobile   = txtMobile.Text;

            forSqlOp.SelectedSnacks = ddlItemName.SelectedValue;
            forSqlOp.SnackQuantity  = txtQuantity.Text;

            forSqlOp.EmpId = txtEmpId.Text;


            forSqlOp.OrderQuanty = "" + TotalCount;
            forSqlOp.FromDate    = txtFromDate.Text;
            forSqlOp.ToDate      = txtToDate.Text;


            forSqlOp.DepartID   = ddlDeptID.SelectedItem.Text;
            forSqlOp.LocId      = ddlLocation.SelectedValue;
            forSqlOp.CanteenID  = ddlCanteen.SelectedValue;
            forSqlOp.AddDetails = txtAddDetails.Text;
            forSqlOp.FoodType   = ddlMealType.SelectedItem.Text;
            forSqlOp.RequestID  = Guid.NewGuid().ToString().Substring(0, Guid.NewGuid().ToString().Length - 25);
            RequestID           = forSqlOp.RequestID;
            forSqlOp.TokenID    = Guid.NewGuid().ToString().Substring(0, Guid.NewGuid().ToString().Length - 25);
            forSqlOp.RequestForm();
            forSqlOp.InsertionForGuest();
        }
Exemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            DataTable dt;

            if (!this.IsPostBack)
            {
                AutoFillForDepart();
                AutoFillLoc();
                AutoFillEmpName();
                txtEmpLoyee.Text = Context.User.Identity.GetUserName();
                dt = new DataTable();
                dt.Columns.AddRange(new DataColumn[5] {
                    new DataColumn("S.No"), new DataColumn("GuestName"), new DataColumn("Name"), new DataColumn("MobileNo"), new DataColumn("Token No")
                });
                ViewState["Guest"] = dt;
                this.BindGrid();
            }
            if (Context.User.IsInRole("HR"))
            {
                dt = new DataTable();
                dt.Columns.AddRange(new DataColumn[5] {
                    new DataColumn("SlNo"), new DataColumn("EmpName"), new DataColumn("DeptName"), new DataColumn("Mobile"), new DataColumn("TokenNo")
                });
                dt.Columns.AddRange(new DataColumn[3] {
                    new DataColumn("Item"), new DataColumn("Qunatity"), new DataColumn("MobileNo")
                });
                TableForHr.Visible     = true;
                TableForSnacks.Visible = true;
                AutoFillIteam();
            }
            else
            {
                TableForHr.Visible     = false;
                TableForSnacks.Visible = false;
            }
            if (Session["Result"] == "Accepted")
            {
                Response.Write("<script>alert('" + "Admin Has Accepted your request" + "');</script>");
            }
            if (Session["Result"] == "Rejected")
            {
                forSqlOp = new ForSqlOp();
                forSqlOp.AdminIsApproved((Session["AdminReflex"]).ToString());
                Response.Write("<script>alert('" + "Admin Has Rejected your request" + "');</script>");
            }
        }
Exemplo n.º 3
0
        void AssignValues()
        {
            ForSqlOp forSqlOp = new ForSqlOp();

            forSqlOp.GName      = txtGuestName.Text;
            forSqlOp.OrgName    = txtOrgName.Text;
            forSqlOp.MobileNo   = txtMobileNo.Text;
            forSqlOp.EmpId      = txtEmpId.Text;
            forSqlOp.DepartID   = ddlDeptID.SelectedItem.Text;
            forSqlOp.LocId      = ddlLocation.SelectedValue;
            forSqlOp.CanteenID  = ddlCanteen.SelectedValue;
            forSqlOp.FromDate   = lblFromdate.Text;
            forSqlOp.ToDate     = lblToDate.Text;
            forSqlOp.AddDetails = txtAddDetails.Text;
            forSqlOp.FoodType   = ddlMealType.SelectedValue;
            string RequestID = Guid.NewGuid().ToString().Substring(0, Guid.NewGuid().ToString().Length - 15);
            string Token     = Guid.NewGuid().ToString().Substring(0, Guid.NewGuid().ToString().Length - 15);

            forSqlOp.RequestForm(RequestID, Token);
            forSqlOp.InsertionForGuest(RequestID, Token);
        }