protected void GetTemplateList()
        {
            //select * from VW_GetTemplateDetails
            iPartRequestClient objService = new iPartRequestClient();
            CustomProfile      profile    = CustomProfile.GetProfile();

            GVRequest.DataSource = null;
            GVRequest.DataBind();

            DataSet dsTemplate = new DataSet();
            string  UserType   = profile.Personal.UserType.ToString();

            if (UserType == "Super Admin")
            {
                dsTemplate = objService.GetTemplateDetailsSuperAdmin(profile.DBConnection._constr);
            }
            else if (UserType == "Admin")
            {
                dsTemplate = objService.GetTemplateDetailsAdmin(profile.Personal.UserID, profile.DBConnection._constr);
            }
            //else
            //{
            //   // dsTemplate = objService.GetTemplateDetails(profile.Personal.UserID, profile.DBConnection._constr);
            //}
            //dsTemplate = objService.GetTemplateDetails(profile.Personal.UserID, profile.DBConnection._constr);

            GVRequest.DataSource = dsTemplate;
            GVRequest.DataBind();
        }
        protected void FillGVRequest(string FillBy, string Invoker)
        {
            iPartRequestClient objServie = new iPartRequestClient();

            try
            {
                CustomProfile profile = CustomProfile.GetProfile();
                GVRequest.DataSource = null;
                GVRequest.DataBind();
                //New Added By Suresh for GWC

                string UserType = profile.Personal.UserType.ToString();

                //New Added By Suresh for GWC
                if (FillBy == "UserID")
                {
                    if (Invoker == "Request")
                    {
                        if (UserType == "User" || UserType == "Requester" || UserType == "Requestor")
                        {
                            GVRequest.DataSource = objServie.GetRequestSummayOfUser(profile.Personal.UserID, profile.DBConnection._constr);
                        }
                        else
                        {
                            GVRequest.DataSource = objServie.GetRequestSummayByUserID(profile.Personal.UserID, profile.DBConnection._constr);
                        }
                        GVRequest.Columns[12].Visible = false; GVRequest.AllowMultiRecordSelection = true; GVRequest.AllowRecordSelection = true;
                    }
                    else if (Invoker == "Issue")
                    {
                        if (UserType == "User" || UserType == "Requester" || UserType == "Requestor")
                        {
                            GVRequest.DataSource = objServie.GetRequestSummayOfUserIssue(profile.Personal.UserID, profile.DBConnection._constr);
                        }
                        else
                        {
                            GVRequest.DataSource = objServie.GetRequestSummayByUserIDIssue(profile.Personal.UserID, profile.DBConnection._constr);
                        }
                        GVRequest.Columns[12].Visible = true; GVRequest.AllowMultiRecordSelection = true; GVRequest.AllowRecordSelection = true;
                    }
                }
                else if (FillBy == "SiteIDs")
                {
                    GVRequest.DataSource = objServie.GetRequestSummayBySiteIDs(Session["SiteIDs"].ToString(), profile.DBConnection._constr);
                }
                GVRequest.DataBind();
            }
            catch { }
            finally { objServie.Close(); }
        }
        protected void GetTemplateList()
        {
            //select * from VW_GetTemplateDetails    HttpContext.Current.Session["ReportDS"] = dsCmnRpt;
            iPartRequestClient objService = new iPartRequestClient();
            CustomProfile      profile    = CustomProfile.GetProfile();

            GVRequest.DataSource = null;
            GVRequest.DataBind();
            long    DeptID     = long.Parse(Session["DeptID"].ToString());
            DataSet dsTemplate = new DataSet();

            dsTemplate = objService.GetTemplateDetailsBind(profile.Personal.UserID, DeptID, profile.DBConnection._constr);
            // dsTemplate = objService.GetTemplateDetails(profile.Personal.UserID,  profile.DBConnection._constr);

            GVRequest.DataSource = dsTemplate;
            GVRequest.DataBind();
        }