protected void grdResult_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            GridViewRow  currentRow   = (GridViewRow)(((Button)e.CommandSource).NamingContainer);
            DropDownList drpReqStatus = (DropDownList)currentRow.FindControl("drpReqStatus") as DropDownList;

            reqID  = Convert.ToInt32(currentRow.Cells[1].Text);
            stcode = currentRow.Cells[2].Text;
            stName = currentRow.Cells[3].Text;

            ViewState.Add("stcode", stcode);
            ViewState.Add("stName", stName);
            ViewState.Add("reqID", reqID);

            if (e.CommandName == "History")
            {
                CommonBusiness cmb = new CommonBusiness();

                lst_history.DataSource = cmb.GetUserLogByModifyId(int.Parse(e.CommandArgument.ToString()), 12);
                lst_history.DataBind();

                info1.InnerText = "نام دانشجو:" + ViewState["stName"].ToString();
                info2.InnerText = "شماره درخواست:" + ViewState["reqID"].ToString();

                stcode = ViewState["stCode"].ToString();
                stName = ViewState["stName"].ToString();
                reqID  = Convert.ToInt32(ViewState["reqID"]);

                ScriptManager.RegisterStartupScript(this, this.GetType(), "Pop", "openModal();", true);
            }

            if (e.CommandName == "Deny")
            {
                string message;
                CheckOutRequestBusiness CheckBusiness = new CheckOutRequestBusiness();
                dt = (DataTable)ViewState["dt"];
                GridViewRow row           = grdResult.Rows[0];
                int         eraeBe        = 5;
                int         currentStatus = 5;
                int         reqType       = Convert.ToInt32(dt.Rows[0]["RequestTypeID"]);
                TextBox     txtDenyReason = (TextBox)grdResult.Rows[0].Cells[6].FindControl("txtDenyReason");
                message = business.DenyCheckOutRequestByCurrentStatus(Session[sessionNames.userID_Karbar].ToString(), currentStatus, eraeBe, reqID, reqType);
                business.SendMessage(Session[sessionNames.userID_Karbar].ToString(), reqID, txtDenyReason.Text);
                CheckBusiness.DeleteCheckOutFromFraghat(reqID);
                txtDenyReason.Text = "";

                RadWindowManager1.RadAlert(message, 0, 100, " پیام سیستم", "");
                BindGrid();
            }
        }
        protected void btnSubmitMsg_Click(object sender, EventArgs e)
        {
            string msg;
            int    status  = Convert.ToInt32(ViewState["status"]);
            int    reqID   = Convert.ToInt32(ViewState["reqID"]);
            string stcode  = ViewState["stcode"].ToString();
            int    reqType = Convert.ToInt32(ViewState["reqType"]);

            userID = Session[sessionNames.userID_Karbar].ToString();
            msg    = business.SendMessage(userID, reqID, txtMsg.Text);
            RadWindow2.VisibleOnPageLoad = false;
            if (drpCheckOutType.SelectedIndex != 0)
            {
                BindGrid(Convert.ToInt32(drpCheckOutType.SelectedValue));
            }
            else
            {
                grd_CheckOutRequest.DataSource = business.GetCheckOutInfoByStCode(stcode);
                grd_CheckOutRequest.DataBind();
                btnDlExcel.Visible = true;
            }
        }