protected void Page_Load(object sender, EventArgs e)
        {
            objgen.validatelogin();
            if (!Page.IsPostBack)
            {
                txtfrom.Text = GeneralMethod.getEmpDate();
                txtto.Text   = DateTime.Now.AddDays(15).ToString("MM/dd/yyyy");
                appointment_minDate.Value = txtfrom.Text;

                //role 9 indicates Approve Task
                if (!objda.checkUserInroles("108"))
                {
                    Response.Redirect("UserDashboard.aspx");
                }

                if (Request.QueryString["appointmentid"] != null)
                {
                    obj.fromdate  = "";
                    obj.todate    = "";
                    obj.companyid = "";
                    obj.status    = "";
                    obj.nid       = Request.QueryString["appointmentid"].ToString();
                    obj.action    = "select";
                    ds            = obj.APP_ManageAppointment_new();
                    if (ds.Tables[0].Rows.Count > 0)
                    {
                        ScriptManager.RegisterStartupScript(this, GetType(), "key", "<script type='text/javascript'>openstatus(" + Request.QueryString["appointmentid"].ToString() + ");</script>", false);
                    }
                }
            }
        }
Exemple #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     objgen.validatelogin();
     if (!Page.IsPostBack)
     {
         //role 9 indicates Approve Task
         if (!objda.checkUserInroles("110"))
         {
             Response.Redirect("UserDashboard.aspx");
         }
         txtfrom.Text = Convert.ToDateTime(GeneralMethod.getEmpDate()).AddYears(-1).ToString("MM/dd/yyyy");
         txtto.Text   = Convert.ToDateTime(GeneralMethod.getEmpDate()).AddDays(7).ToString("MM/dd/yyyy");
         fillevenetype();
         fillproject();
         fillemp();
     }
 }
Exemple #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     objgen.validatelogin();
     if (!Page.IsPostBack)
     {
         txtDate_CalendarExtender.StartDate  = Convert.ToDateTime(GeneralMethod.getEmpDate());
         txtDate_CalendarExtender1.StartDate = Convert.ToDateTime(GeneralMethod.getEmpDate());
         txtfrom.Text = GeneralMethod.getEmpDate();
         txtto.Text   = Convert.ToDateTime(GeneralMethod.getEmpDate()).AddDays(7).ToString("MM/dd/yyyy");
         appointment_minDate.Value = txtfrom.Text;
         fillemp();
         //role 9 indicates Approve Task
         if (!objda.checkUserInroles("107"))
         {
             Response.Redirect("UserDashboard.aspx");
         }
     }
 }