public void IsMember(User CurrentUser)
        {
            string siteApproverGroupname = Config.TimeOffApprovers;
            ConfigListValues objConfigAppList = new ConfigListValues();
            objConfigAppList.GetConfigValues(null);
            if (objConfigAppList.items != null)
            {
                if (objConfigAppList.items.ContainsKey("TimeOffApprovers"))
                    siteApproverGroupname = objConfigAppList.items["TimeOffApprovers"].ToString();
            }

            GroupsClass objTOR = new GroupsClass();
            IsGroupMember = objTOR.IsCurrentUserExistInGroup(siteApproverGroupname, CurrentUser.LoginName);
        }
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            GroupsClass obj = new GroupsClass();
           // sharepointUrl = new Uri(Request.QueryString[Config.ListURL]);
            timeOffRequestID = Request.QueryString["RequestID"];
            string[] reqdAtten = { RequestedByEmail };
            string[] optAtten={};
            if (UpdateStatus(((Button)sender).CommandArgument, "Approved"))
            {
                string msg = "Time Off Request of " + this.lblTimeoffType.Text + ": on " + this.txtStartDate.Text + " to " + this.txtEndDate.Text + " has been Approved";
                EWSClass objEWS = new EWSClass();
                if (this.lblFullday.Text == "Full Day(s)")
                {
                    this.txtStartDate.Text += " 12:00 AM";
                    this.txtEndDate.Text += " 12:00 PM";
                }

                        
                string UserID = Config.SenderEmail;//default from web.config
                string UserPassword = Config.SenderPassword;
                string WorkingHours = Config.WorkingHours;            
                ConfigListValues objConfigAppList = new ConfigListValues();
                objConfigAppList.GetConfigValues(null);
                if (objConfigAppList.items != null)
                {
                    if (objConfigAppList.items.ContainsKey("SenderEmail"))                   
                        UserID = objConfigAppList.items["SenderEmail"].ToString();  
                    if (objConfigAppList.items.ContainsKey("SenderPassword"))                  
                        UserPassword = objConfigAppList.items["SenderPassword"].ToString();
                    if (objConfigAppList.items.ContainsKey("WorkingHours"))
                        WorkingHours = objConfigAppList.items["WorkingHours"].ToString();
                }
                objEWS.SetupCalendarEvent(msg, this.txtStartDate.Text, this.txtEndDate.Text, reqdAtten, optAtten, UserID, UserPassword, WorkingHours);
                try
                {
                    string siteToken;
                    if (Session["contextToken"] != null)
                    {
                        DeptCalListClass objDept = new DeptCalListClass();
                        siteToken = Session["contextToken"] as string;
                        objDept.AddDeptCal(null, this.lblRequestedBy.Text + "-" + this.lblTimeoffType.Text, this.txtStartDate.Text, this.txtEndDate.Text);
                    }
                }
                catch { }
                Response.Redirect("ui.aspx?SPHostUrl=" + Request.QueryString["SPHostUrl"].ToString() + "&approval=1&" + Config.ListURL + "=" + Request.QueryString["SPAppWebUrl"].ToString());  
            }
            Response.Redirect("ui.aspx?SPHostUrl=" + Request.QueryString["SPHostUrl"].ToString() + "&approval=0&" + Config.ListURL + "=" + Request.QueryString["SPAppWebUrl"].ToString());               
        }