Beispiel #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["UserName"] == null)
            {
                Response.Redirect("LogIn.aspx");
            }
            else if (Session["UserName"].ToString() == "administrator" || Session["UserName"].ToString().ToLower() == "gtecobranza")
            {
                hrefSettings.Visible = true;
            }

            ScriptManager scriptManager = ScriptManager.GetCurrent(this.Page);

            scriptManager.RegisterPostBackControl(this.btnCalificarLlamada);
            scriptManager.RegisterPostBackControl(this.btnAddTelefonoTit);
            scriptManager.RegisterPostBackControl(this.btnAddDomicilioTit);
            scriptManager.RegisterPostBackControl(this.btnAddTelefonoAval);
            scriptManager.RegisterPostBackControl(this.btnAddDomicilioAval);
            scriptManager.RegisterPostBackControl(this.btnBitacora);
            scriptManager.RegisterPostBackControl(this.ddlBitStatus);
            scriptManager.RegisterPostBackControl(this.btnNumCliente);
            scriptManager.RegisterPostBackControl(this.rblType);
            scriptManager.RegisterPostBackControl(this.btnObtenerSaldos);
            scriptManager.RegisterPostBackControl(this.btnSearchByName);

            if (IsPostBack)
            {
                TabName.Value             = Request.Form[TabName.UniqueID];
                lblMessageScreen1.Visible = false;
            }
            else
            {
                PaymentsSL payments = new PaymentsSL();
                Session["Information"] = payments.GetFirstPaymentByUser(Session["IDUser"].ToString());
                Session["StartTime"]   = DateTime.Now;

                DataTable data = Session["Information"] as DataTable;
                if (data.Rows.Count > 0)
                {
                    payments.CustomerID = data.Rows[0]["PKCliente"].ToString().Trim();
                    payments.SetPaymentBusy();
                    SetInitialData();
                    btnBitacora.Enabled = true;
                }
                else //there aren't elements in queue
                {
                    DisableFields();
                    FillDropDowns();
                    btnBitacora.Enabled = false;
                }
            }
        }
Beispiel #2
0
        protected void rblType_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {
                PaymentsSL payments = new PaymentsSL(txtNumCliente.Text.Trim());
                payments.SetPaymentFree();
                ClearAllData();
                if (rblType.SelectedItem.Value == "Automatico")
                {
                    //queue
                    Session["Information"] = payments.GetFirstPaymentByUser(Session["IDUser"].ToString());
                    Session["StartTime"]   = DateTime.Now;

                    DataTable data = Session["Information"] as DataTable;
                    if (data.Rows.Count > 0)
                    {
                        payments.CustomerID = data.Rows[0]["PKCliente"].ToString().Trim();
                        payments.SetPaymentBusy();
                        SetInitialData();
                        btnBitacora.Enabled = true;
                    }


                    btnSearchByName.Visible = false;
                    pnlMainScreen.Enabled   = false;
                }
                else
                {
                    pnlMainScreen.Enabled = true;
                    DisableFieldsManual(false);
                    //txtNombre.Enabled = true;
                    txtNombre.Focus();
                    //txtNumCliente.Enabled = true;
                    btnSearchByName.Visible = true;
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }