Exemplo n.º 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         if (Convert.ToString(Server.HtmlEncode(Request.Cookies["MyLogin"]["PWD"])) == "")
         {
             Response.Redirect("../Login.aspx");
         }
         else
         {
             //showimg();
         }
         txtsessionyear.Text = DateTime.Now.Year.ToString();
         if (!IsPostBack)
         {
             clState.xmlstate(ddlState, "XMLState.xml");
             clState.xmlCity(ddlCity, ddlState.SelectedItem.Text, "XMLState.xml");
             txtcounselor.Focus();
             txtdate.Text = DateTime.Now.ToString("dd/MM/yyyy");
             maikal mk    = new maikal();
             int    lvl   = mk.returnlevel(Server.HtmlEncode(Request.Cookies["MyLogin"]["UID"]).ToString(), Server.HtmlEncode(Request.Cookies["MyLogin"]["PWD"]).ToString());
             ClsFO  clsfo = new ClsFO();
             lblCID.Text = (clsfo.maxSN() + 1).ToString();
         }
     }
     catch (NullReferenceException ex)
     {
         Response.Redirect("../Login.aspx");
     }
 }
Exemplo n.º 2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         if (Convert.ToString(Server.HtmlEncode(Request.Cookies["MyLogin"]["PWD"])) == "")
         {
             Response.Redirect("../Login.aspx");
         }
         else
         {
             maikal mk  = new maikal();
             int    lvl = mk.returnlevel(Convert.ToString(Server.HtmlEncode(Request.Cookies["MyLogin"]["UID"])), Convert.ToString(Server.HtmlEncode(Request.Cookies["MyLogin"]["PWD"])));
         }
         if (!IsPostBack)
         {
             txtName.Focus();
             txtDate.Text      = DateTime.Now.ToString("dd/MM/yyyy");
             lblGridTitle.Text = " Today Visitor List ";
             SqlDataAdapter ad = new SqlDataAdapter("select Name,Phone,Mobile,Email,Reason,Detail from Reception where Date='" + DateTime.Now.Date + "' ORDER BY SN DESC", con);
             DataSet        ds = new DataSet();
             ad.Fill(ds);
             GrvVisitorview.DataSource = ds;
             GrvVisitorview.DataBind();
         }
     }
     catch (NullReferenceException ex)
     {
         Response.Redirect("../Login.aspx");
     }
 }
Exemplo n.º 3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         if (Convert.ToString(MyLogin.login[0]) == "")
         {
             Response.Redirect("../Login.aspx");
         }
         else
         {
             if (!IsPostBack)
             {
                 ddlType.SelectedValue = "All"; ddlStatus.SelectedValue = "Registered";
                 clsstatecity.xmlstate(ddlState, "XMLState.xml");
                 clsstatecity.xmlCity(ddlCity, ddlState.SelectedItem.Text.ToString(), "XMLState.xml");
                 txtIMID.Text = Request.QueryString["id"].ToString();
                 if (Request.QueryString["id"] == "")
                 {
                     panelProfile.Visible = false; panelInspection.Visible = false; panelChangeStatus.Visible = false; panelSubscribe.Visible = false;
                 }
                 else
                 {
                     panelProfile.Visible = true;
                     showprofile(Request.QueryString["id"]);
                 }
                 maikal dev = new maikal();
                 int    se  = dev.chksession();
                 if (se == 0)
                 {
                     ddlsession.SelectedValue = "Sum"; ddlSessionFrom.SelectedValue = "Sum";
                 }
                 else
                 {
                     ddlsession.SelectedValue = "Win"; ddlSessionFrom.SelectedValue = "Win";
                 }
                 txtSession.Text        = DateTime.Now.Year.ToString(); txtYearFrom.Text = DateTime.Now.Year.ToString();
                 lblSessionHiddend.Text = ddlsession.SelectedValue.ToString() + "" + txtSession.Text.ToString();
                 SqlDataAdapter ad = new SqlDataAdapter("select ID,Name,Address,State,Email,Type,RegDate,YearFrom from Member where Active='Registered' or Active='Register'", con);
                 DataSet        ds = new DataSet();
                 ad.Fill(ds);
                 GridDuplicacy.DataSource = ds;
                 GridDuplicacy.DataBind();
                 lblInspectionNo.Text = "0";
                 maikal devnagar = new maikal();
                 int    lvl      = devnagar.returnlevel(MyLogin.login[1].ToString(), MyLogin.login[0].ToString());
                 if (lvl == 2)
                 {
                     panelChangeStatus.Enabled = false; panelSubscribe.Enabled = false;
                 }
                 txtAddress.Focus();
             }
         }
     }
     catch (NullReferenceException ex)
     {
         Response.Redirect("../Login.aspx");
     }
 }
Exemplo n.º 4
0
    protected void lblHomeRedirect_Click(object sender, EventArgs e)
    {
        maikal mk = new maikal();
        int    i  = mk.returnlevel(Server.HtmlEncode(Request.Cookies["MyLogin"]["UID"]).ToString(), Server.HtmlEncode(Request.Cookies["MyLogin"]["PWD"]).ToString());

        if (i == 0 | i == 1)
        {
            Response.Redirect("../SuperAdmin.aspx?" + Request.Cookies["redic"].Value.ToString());
        }
        else if (i == 2)
        {
            Response.Redirect("../UserHome.aspx?" + Request.Cookies["redic"].Value.ToString());
        }
    }
Exemplo n.º 5
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         if (Convert.ToString(Server.HtmlEncode(Request.Cookies["MyLogin"]["PWD"])) == "")
         {
             Response.Redirect("../Login.aspx");
             invisible.Visible = true; visible.Visible = false;
         }
         if (Request.QueryString["maikal"].ToString() == "")
         {
             invisible.Visible = true;
         }
         else
         {
             lblEnrolment.Text = Request.QueryString["maikal"].ToString();
             invisible.Visible = false;
         }
         if (!IsPostBack)
         {
             //txtYear.Text = DateTime.Now.Year.ToString();
             //maikal dev = new maikal();
             //int se = dev.chksession();
             //if (se == 0) ddlSession.SelectedValue = "Sum";
             //else ddlSession.SelectedValue = "Win";
             //lblHiddenSeason.Text = ddlExamSeason.SelectedValue.ToString() + "" + txtYearSeason.Text.ToString();
             //visisble.Visible = true; invisible.Visible = true;
             //room();
             //txtExamID.Text = idcenter();
             //ddlExamSeason.Focus();
         }
         maikal mk = new maikal();
         int    i  = mk.returnlevel(Server.HtmlEncode(Request.Cookies["MyLogin"]["UID"]).ToString(), Server.HtmlEncode(Request.Cookies["MyLogin"]["PWD"]).ToString());
         if (i == 0 | i == 1)
         {
             invisible.Visible = true;
         }
         else if (i == 2)
         {
             invisible.Visible = false;
         }
     }
     catch (NullReferenceException ex)
     {
         Response.Redirect("../Login.aspx");
     }
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         if (Convert.ToString(Server.HtmlEncode(Request.Cookies["MyLogin"]["PWD"])) == "")
         {
             Response.Redirect("../Login.aspx");
         }
         else
         {
             if (!IsPostBack)
             {
                 dtinfo.ShortDatePattern = "dd/MM/yyyy";
                 dtinfo.DateSeparator    = "/";
                 pnlCounselling.Visible  = false;
                 rbtndate.Checked        = true;
                 maikal mk  = new maikal();
                 int    lvl = mk.returnlevel(Server.HtmlEncode(Request.Cookies["MyLogin"]["UID"]).ToString(), Server.HtmlEncode(Request.Cookies["MyLogin"]["PWD"]).ToString());
                 txtDate.Text        = DateTime.Now.ToString("dd/MM/yyyy");
                 txtCurrentDate.Text = DateTime.Now.ToString("dd/MM/yyyy");
                 SqlDataAdapter ad = new SqlDataAdapter("select * from Counselling where Date Between '" + Convert.ToDateTime(txtDate.Text, dtinfo).AddMonths(-1) + "' and '" + Convert.ToDateTime(txtDate.Text, dtinfo) + "'", con);
                 DataSet        ds = new DataSet();
                 ad.Fill(ds);
                 GridCounselling.DataSource = ds;
                 GridCounselling.DataBind();
                 GridCounselling.Focus();
             }
             if (rbtnFollowupDate.Checked == true)
             {
                 if (lblCID.Text.ToString() == null)
                 {
                     SqlDataAdapter ad = new SqlDataAdapter("select * from Followup where CID='" + Convert.ToInt32(lblCID.Text) + "'", con);
                     DataSet        ds = new DataSet();
                     ad.Fill(ds);
                     GridCounselling.DataSource = ds;
                     GridCounselling.DataBind();
                 }
             }
             btnView.Focus();
         }
     }
     catch (NullReferenceException ex)
     {
         Response.Redirect("../Login.aspx");
     }
 }
Exemplo n.º 7
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         if (Convert.ToString(Server.HtmlEncode(Request.Cookies["MyLogin"]["PWD"])) == "")
         {
             Response.Redirect("../Login.aspx");
         }
         else
         {
             if (!IsPostBack)
             {
                 clstate.xmlstate(ddlState, "XMLState.xml");
                 grvCourierHomeFill();
                 lblGridTitle.Text = "Today Diary Entries";
                 btnshow_Onclick();
                 txtDate.Text    = DateTime.Now.ToString("dd/MM/yyyy hh:mm");
                 txtDate.Enabled = false;
                 maikal dev = new maikal();
                 maikal mk  = new maikal();
                 int    lvl = mk.returnlevel(Server.HtmlEncode(Request.Cookies["MyLogin"]["UID"]).ToString(), Server.HtmlEncode(Request.Cookies["MyLogin"]["PWD"]).ToString());
                 int    se  = dev.chksession();
                 if (se == 0)
                 {
                     ddlExamSeason.SelectedValue = "Sum";
                 }
                 else
                 {
                     ddlExamSeason.SelectedValue = "Win";
                 } lblFromName.Text   = "Membership No:";
                 txtYearSeason.Text   = DateTime.Now.Year.ToString();
                 formstatus           = "Yes";
                 lblHiddenSeason.Text = ddlExamSeason.SelectedValue.ToString() + "" + txtYearSeason.Text.ToString();
                 ddlExamSeason.Focus();
                 panelCourier.Visible = false;
                 otherpnl.Visible     = false; lblFromName.Text = ddlRecivefrom.SelectedItem.Text.ToString();
                 getrefno();
             }
             ddlExamSeason.Focus();
         }
     }
     catch (NullReferenceException ex)
     {
         Response.Redirect("../Login.aspx");
     }
 }
Exemplo n.º 8
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (Convert.ToString(Server.HtmlEncode(Request.Cookies["MyLogin"]["PWD"])) == "")
            {
                Response.Redirect("../Login.aspx");
            }
            else
            {
                if (!IsPostBack)
                {
                    lblOtherCity.Visible = false;

                    txtNewCity.Visible = false;
                    clstate.xmlstate(ddlState, "XMLState.xml");
                    clstate.xmlCity(ddlCity, ddlState.SelectedItem.Text.ToString(), "XMLState.xml");
                    maikal dev = new maikal();
                    maikal mk  = new maikal();
                    int    lvl = mk.returnlevel(Server.HtmlEncode(Request.Cookies["MyLogin"]["UID"]).ToString(), Server.HtmlEncode(Request.Cookies["MyLogin"]["PWD"]).ToString());
                    int    se  = dev.chksession();
                    if (se == 0)
                    {
                        ddlExamSeason.SelectedValue = "Sum";
                    }
                    else
                    {
                        ddlExamSeason.SelectedValue = "Win";
                    }
                    txtDiaryDate.Text    = Convert.ToString(DateTime.Now.ToString("dd/MM/yyyy"));
                    txtYearSeason.Text   = DateTime.Now.Year.ToString();
                    lblHiddenSeason.Text = ddlExamSeason.SelectedValue.ToString() + "" + txtYearSeason.Text.ToString();
                    tbltext.Visible      = false;
                    lblFromName.Text     = "IM ID"; panelCourier.Visible = false;
                    getrefno();
                }
                ddlExamSeason.Focus();
            }
        }
        catch (NullReferenceException ex)
        {
            Response.Redirect("../Login.aspx");
        }
    }
Exemplo n.º 9
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         if (Convert.ToString(MyLogin.login[0]) == "")
         {
             Response.Redirect("../Login.aspx");
         }
         else
         {
             if (!IsPostBack)
             {
                 ddlstatebind();
                 lblid.Visible           = true;
                 txtid.Visible           = true;
                 rbtnactive.Visible      = false;
                 rbtnblock.Visible       = false;
                 Lblstate.Visible        = false;
                 ddlState.Visible        = false;
                 lblname.Visible         = false;
                 txtname.Visible         = false;
                 ddlSearch.SelectedValue = "IMID";
                 maikal mk  = new maikal();
                 int    lvl = mk.returnlevel(Convert.ToString(MyLogin.login[1]), Convert.ToString(MyLogin.login[0]));
                 if (lvl == 0)
                 {
                 }
                 else if (lvl == 1)
                 {
                 }
                 else if (lvl == 2)
                 {
                 }
                 ddlSearch.Focus();
             }
         }
     }
     catch (NullReferenceException ex)
     {
         Response.Redirect("../Login.aspx");
     }
 }
Exemplo n.º 10
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         if (Convert.ToString(Server.HtmlEncode(Request.Cookies["MyLogin"]["PWD"])) == "")
         {
             Response.Redirect("../Login.aspx");
         }
         else
         {
             if (!IsPostBack)
             {
                 maikal dev = new maikal();
                 maikal mk  = new maikal();
                 int    lvl = mk.returnlevel(Server.HtmlEncode(Request.Cookies["MyLogin"]["UID"]).ToString(), Server.HtmlEncode(Request.Cookies["MyLogin"]["PWD"]).ToString());
                 int    se  = dev.chksession();
                 if (se == 0)
                 {
                     ddlExamSeason.SelectedValue = "Sum";
                 }
                 else
                 {
                     ddlExamSeason.SelectedValue = "Win";
                 }
                 txtYearSeason.Text   = DateTime.Now.Year.ToString();
                 lblHiddenSeason.Text = ddlExamSeason.SelectedValue.ToString() + "" + txtYearSeason.Text.ToString();
                 txtDiaryNo.Visible   = false; ddlExamSeason.Visible = false; txtYearSeason.Visible = false;
                 lblGridTitle.Text    = "This Week Diary";
                 SqlDataAdapter ad = new SqlDataAdapter("select Name,Phone,Mobile,Email,Date,Reason,Detail from Reception where Date BETWEEN '" + DateTime.Now.AddDays(-7) + "' and '" + DateTime.Now + "' order by SN DESC", con);
                 DataSet        ds = new DataSet();
                 ad.Fill(ds);
                 GridView1.DataSource = ds;
                 GridView1.DataBind();
                 ddlType.Focus();
             }
         }
     }
     catch (NullReferenceException ex)
     {
         Response.Redirect("../Login.aspx");
     }
 }
Exemplo n.º 11
0
 protected void imgbtnRecover_Click(object sender, ImageClickEventArgs e)
 {
     try
     {
         maikal mk  = new maikal();
         int    lvl = mk.returnlevel(Server.HtmlEncode(Request.Cookies["MyLogin"]["UID"]).ToString(), Server.HtmlEncode(Request.Cookies["MyLogin"]["PWD"]).ToString());
         if (lvl == 0 & (Request.QueryString["lnk"].ToString() != "null"))
         {
             Response.Redirect("Admin/AdminCreate.aspx?lnk=update&lvl=zerotyp=Admin");
         }
         else if (lvl == 1 | (Request.QueryString["lnk"].ToString() == "null"))
         {
             Response.Redirect("User/Create.aspx?lnk=update&lvl=one&typ=" + Request.QueryString["typ"].ToString() + "");
         }
     }
     catch (NullReferenceException ex)
     {
         Response.Redirect("Login.aspx");
     }
 }
Exemplo n.º 12
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         if (Convert.ToString(Server.HtmlEncode(Request.Cookies["MyLogin"]["PWD"])) == "")
         {
             Response.Redirect("../Login.aspx");
         }
         else
         {
             if (!IsPostBack)
             {
                 maikal dev = new maikal();
                 maikal mk  = new maikal();
                 int    lvl = mk.returnlevel(Server.HtmlEncode(Request.Cookies["MyLogin"]["UID"]).ToString(), Server.HtmlEncode(Request.Cookies["MyLogin"]["PWD"]).ToString());
                 int    se  = dev.chksession();
                 if (se == 0)
                 {
                     ddlExamSeason.SelectedValue = "Sum";
                 }
                 else
                 {
                     ddlExamSeason.SelectedValue = "Win";
                 }
                 txtYearSeason.Text   = DateTime.Now.Year.ToString();
                 lblHiddenSeason.Text = ddlExamSeason.SelectedValue.ToString() + "" + txtYearSeason.Text.ToString();
                 lblName.Text         = "IMID";
                 pnlNo.Visible        = false; pnlsession.Visible = true; ddlCourier.Visible = false;
                 lblGridTitle.Text    = "Last 30 Couriers " + txtNo.Text.ToString();
                 query = "select CourierType,SendTo,Name,Date,CourierService,Session,CourierSerialno,Consignmentno,Weight,Amount from CourierRD where Date BETWEEN '" + DateTime.Now.AddDays(-30) + "' and '" + DateTime.Now + "'";
                 GridCourier.DataSource = fillGrid();
                 DataBind();
                 ddlsearch.Focus();
             }
         }
     }
     catch (NullReferenceException ex)
     {
         Response.Redirect("../Login.aspx");
     }
 }
Exemplo n.º 13
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         if (Convert.ToString(Server.HtmlEncode(Request.Cookies["MyLogin"]["PWD"])) == "")
         {
             Response.Redirect("../Login.aspx");
         }
         else
         {
             if (!IsPostBack)
             {
                 clstate.xmlstate(ddlState, "XMLState.xml");
                 maikal dev = new maikal();
                 maikal mk  = new maikal();
                 int    lvl = mk.returnlevel(Server.HtmlEncode(Request.Cookies["MyLogin"]["UID"]).ToString(), Server.HtmlEncode(Request.Cookies["MyLogin"]["PWD"]).ToString());
                 int    se  = dev.chksession();
                 if (se == 0)
                 {
                     ddlExamSeason.SelectedValue = "Sum";
                 }
                 else
                 {
                     ddlExamSeason.SelectedValue = "Win";
                 } lblFromName.Text   = "Diary No.:";
                 txtYearSeason.Text   = DateTime.Now.Year.ToString(); tbllabel.Visible = true;
                 formstatus           = "Yes";
                 lblHiddenSeason.Text = ddlExamSeason.SelectedValue.ToString() + "" + txtYearSeason.Text.ToString();
                 panelhide.Visible    = true; panelshow.Visible = false;
                 ddlExamSeason.Focus();
                 panelCourier.Visible = false; panelStatus.Visible = false;
                 ddlExamSeason.Focus();
             }
             btnBlock.Visible = false;
         }
     }
     catch (NullReferenceException ex)
     {
         Response.Redirect("../Login.aspx");
     }
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         if (Convert.ToString(Server.HtmlEncode(Request.Cookies["MyLogin"]["PWD"])) == "")
         {
             Response.Redirect("../Login.aspx");
         }
         else
         {
             if (!IsPostBack)
             {
                 maikal dev = new maikal();
                 maikal mk  = new maikal();
                 int    lvl = mk.returnlevel(Server.HtmlEncode(Request.Cookies["MyLogin"]["UID"]).ToString(), Server.HtmlEncode(Request.Cookies["MyLogin"]["PWD"]).ToString());
                 int    se  = dev.chksession();
                 if (se == 0)
                 {
                     ddlExamSeason.SelectedValue = "Sum";
                 }
                 else
                 {
                     ddlExamSeason.SelectedValue = "Win";
                 }
                 txtYearSeason.Text   = DateTime.Now.Year.ToString();
                 lblHiddenSeason.Text = ddlExamSeason.SelectedValue.ToString() + "" + txtYearSeason.Text.ToString();
                 lblName.Text         = "IMID";
                 pnlNo.Visible        = false; pnlsession.Visible = true; ddlCourier.Visible = false;
                 lblGridTitle.Text    = "Courier Dispatch Details " + txtNo.Text.ToString();
                 query = "select SNo,CourierType,Name,SendTo,City,State,CourierService,Weight,Amount,Date,CourierSerialno from CourierRD ";
                 fillGrid(query);
                 ddlsearch.Focus();
             }
         }
     }
     catch (NullReferenceException ex)
     {
         Response.Redirect("../Login.aspx");
     }
 }
Exemplo n.º 15
0
    protected void imgbtnDelete_Click(object sender, ImageClickEventArgs e)
    {
        try{
            maikal mk  = new maikal();
            int    lvl = mk.returnlevel(Server.HtmlEncode(Request.Cookies["MyLogin"]["UID"]).ToString(), Server.HtmlEncode(Request.Cookies["MyLogin"]["PWD"]).ToString());

            if (lvl == 0)
            {
                Response.Redirect("Admin/AdminCreate.aspx?lnk=delete&lvl=zero&typ=Admin");
            }
            else if (lvl == 1)
            {
                Response.Redirect("User/Create.aspx?lnk=delete&lvl=one");
            }
            else
            {
            }
        }
        catch (NullReferenceException ex)
        {
            Response.Redirect("Login.aspx");
        }
    }
Exemplo n.º 16
0
 protected void lblHomeRedirect_Click(object sender, EventArgs e)
 {
     try
     {
         maikal mk  = new maikal();
         int    lvl = mk.returnlevel(MyLogin.login[1].ToString(), MyLogin.login[0].ToString());
         if (lvl == 0)
         {
             Response.Redirect("../SuperAdmin.aspx?" + Request.Cookies["redic"].Value.ToString());
         }
         else if (lvl == 1)
         {
             Response.Redirect("../SuperAdmin.aspx?" + Request.Cookies["redic"].Value.ToString());
         }
         else if (lvl == 2)
         {
             Response.Redirect("../UserHome.aspx?" + Request.Cookies["redic"].Value.ToString());
         }
     }
     catch (NullReferenceException ex)
     {
         Response.Redirect("../Login.aspx");
     }
 }