Exemple #1
0
    protected void btnSubscribe_Onclick(object sender, EventArgs e)
    {
        dtinfo.DateSeparator    = "/";
        dtinfo.ShortDatePattern = "dd/MM/yyyy";
        FeeMaster fm  = new FeeMaster();
        string    sto = fm.rtnlvl(lblSubscriptionFrom.Text);
        string    sub = fm.rtnlvl(lblTo.Text);

        if (Convert.ToInt32(sub) <= Convert.ToInt32(sto))
        {
            con.Close(); con.Open();
            SqlCommand cmd = new SqlCommand();
            cmd = new SqlCommand("update Member set RenewDate=@RenewDate,ExpDate=@ExpDate, YearFrom=@YearFrom, YearTo=@YearTo where ID='" + lblID.Text.ToString() + "'", con);
            DateTime sd = new DateTime();
            sd = Convert.ToDateTime(txtSubDate.Text.ToString(), dtinfo);
            sd = sd.AddMonths(12);
            cmd.Parameters.AddWithValue("@RenewDate", sd);
            sd = sd.AddMonths(6);
            cmd.Parameters.AddWithValue("@ExpDate", sd);
            cmd.Parameters.AddWithValue("@YearFrom", lblSubscriptionFrom.Text.ToString());
            cmd.Parameters.AddWithValue("@YearTo", lblSubscriptionTo.Text.ToString());
            cmd.ExecuteNonQuery();
            imtrans(txtIMID.Text.ToString(), lblSubFee.Text.ToString(), "Subscription Fees", "Subscription");
            amountupdate(txtIMID.Text.ToString(), Convert.ToInt32(lblSubFee.Text));
            ClsAccount amount1 = new ClsAccount();
            amount1.AmountSubmit(txtIMID.Text.ToString(), "", DateTime.Now, "Debit", lblSubFee.Text, lblSubscriptionFrom.Text.ToString(), "Subscription Fees");
            con.Close();
            con.Dispose();
        }
        Response.Redirect(System.Web.HttpContext.Current.Request.Url.AbsoluteUri.ToString());
    }
    protected void txtYearSeason_TextChanged(object sender, EventArgs e)
    {
        FeeMaster fm = new FeeMaster();

        lblExamSeasonHidden.Text = ddlExamSeason.SelectedValue.ToString() + "" + txtYearSeason.Text.ToString();
        lblNewid.Text            = fm.rtnlvl(lblExamSeasonHidden.Text);
    }
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         if (Convert.ToString(Server.HtmlEncode(Request.Cookies["MyLogin"]["PWD"])) == "")
         {
             Response.Redirect("../Login.aspx");
         }
         if (!IsPostBack)
         {
             maikal dev = new maikal();
             int    se  = dev.chksession();
             if (se == 0)
             {
                 ddlExamSeason.SelectedValue = "Sum";
             }
             else
             {
                 ddlExamSeason.SelectedValue = "Win";
             }
             txtYearSeason.Text       = DateTime.Now.Year.ToString();
             lblExamSeasonHidden.Text = ddlExamSeason.SelectedValue.ToString() + "" + txtYearSeason.Text.ToString();
             FeeMaster fm = new FeeMaster();
             lblNewid.Text = fm.rtnlvl(lblExamSeasonHidden.Text);
             ddlExamSeason.Focus();
         }
     }
     catch (NullReferenceException ex)
     {
         Response.Redirect("../../Login.aspx");
     }
 }
Exemple #4
0
    protected void ddldevExamSeason_SelectedIndexChanged(object sender, EventArgs e)
    {
        lblSessionHiddend.Text = ddlsession.SelectedValue.ToString() + "" + txtSession.Text.ToString();
        FeeMaster fm = new FeeMaster();

        lblNewid.Text = fm.rtnlvl(lblSessionHiddend.Text);
        txtSession.Focus();
    }
Exemple #5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (Convert.ToString(Server.HtmlEncode(Request.Cookies["MyLogin"]["PWD"])) == "")
            {
                Response.Redirect("../../Login.aspx");
            }
            if (Request.QueryString["typ"].ToString() == "create")
            {
                panelManage.Visible = false;
                panelCreate.Visible = true;
            }
            else if (Request.QueryString["typ"].ToString() == "manage")
            {
                panelCreate.Visible = false;
                panelManage.Visible = true;
            }

            if (Page.IsPostBack == false)
            {
                maikal dev = new maikal();
                int    se  = dev.chksession();
                if (se == 0)
                {
                    ddlsession.SelectedValue = "Sum";
                }
                else
                {
                    ddlsession.SelectedValue = "Win";
                }
                txtSession.Text         = DateTime.Now.Year.ToString();
                lblSessionHiddend.Text  = ddlsession.SelectedValue.ToString() + "" + txtSession.Text.ToString();
                lbntSelectAging.Visible = false; PnlSubjectEdit.Visible = false;
                PanelCheckBox.Visible   = false;// panelManage.Visible = true;
                FeeMaster fm = new FeeMaster();
                lblNewid.Text = fm.rtnlvl(lblSessionHiddend.Text);
            }
        }
        catch (NullReferenceException ex)
        {
            Response.Redirect("../../Login.aspx");
        }
    }