protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                context = new TAAPsDBContext();

                string yearDiff = (DateTime.Today.Year - 18).ToString();
                string maxDate  = string.Concat(yearDiff, "/12", "/31");
                BirthDateDateEdit.MaxDate = DateTime.Parse(maxDate);
                BirthDateDateEdit.MinDate = DateTime.Parse("01/01/1920");

                SaveButton.Visible    = Global.SessionUser.RoleId == 1 || Global.SessionUser.RoleId == 2 ? true : false;
                SendSMSButton.Visible = Global.SessionUser.RoleId == 1 ? true : false;
                CancelButton.Visible  = Global.SessionUser.RoleId == 1 ? true : false;
                TaxpayerForm.Enabled  = Global.SessionUser.RoleId == 1 || Global.SessionUser.RoleId == 2 ? true : false;
                try
                {
                    if (Page.PreviousPage.IsValid)
                    {
                        LoadListData();
                        ViewState["TIN"] = PreviousPage.TIN;
                        GetTaxpayer((string)ViewState["TIN"]);
                        AddressCardView.DataBind();
                        AttachmentGridview.DataBind();
                    }
                }
                catch (Exception ex)
                {
                    DisplayAlert("Danger", "Individual Taxpayer", ex.Message);
                }
            }
        }
Beispiel #2
0
        private static void ChangeSMSNotificationStatus(string tin)
        {
            TAAPsDBContext context = new TAAPsDBContext();

            var taxpayer = context.ITaxpayers.Single(t => t.TIN == tin);

            taxpayer.SMSNotified = true;
            context.SaveChanges();
        }
Beispiel #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                context = new TAAPsDBContext();
            }

            if (Session["User"] == null)
            {
                Response.Redirect("~/SessionTimeout.aspx");
            }
        }
Beispiel #4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         try
         {
             context = new TAAPsDBContext();
             LoadListData();
         }
         catch (Exception ex)
         {
             DisplayAlert("Danger", "Individual Taxpayer", ex.Message);
         }
     }
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                try
                {
                    context    = new TAAPsDBContext();
                    tinRequest = new Model.CTINRequest();

                    RegistrationDateEdit.MaxDate = DateTime.Today;
                    CacNumberGridLookup.DataBind();

                    TinRequestGrid.Toolbars[0].Items[1].Visible = Global.SessionUser.RoleId == 1 ? false : true;

                    LoadListData();
                }
                catch (Exception ex)
                {
                    DisplayAlert("Danger", "Corporate Taxpayer", ex.Message);
                }
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                try
                {
                    context = new TAAPsDBContext();

                    string yearDiff = (DateTime.Today.Year - 18).ToString();
                    string maxDate  = string.Concat(yearDiff, "/12", "/31");
                    BirthDateDateEdit.MaxDate = DateTime.Parse(maxDate);

                    TinRequestGridview.Toolbars[0].Items[1].Visible = Global.SessionUser.RoleId == 1 ? false : true;

                    LoadListData();
                }
                catch (Exception ex)
                {
                    DisplayAlert("Danger", "Individual Taxpayer", ex.Message);
                }
            }
        }