Exemple #1
0
        private void SetDataToGuaranteePhone()
        {
            DataTable data       = Session["information"] as DataTable;
            String    FKCustomer = data.Rows.Count > 0 ? data.Rows[0]["PKCliente"].ToString().Trim() : String.Empty;
            //String FKInvoice = data.Rows.Count > 0 ? data.Rows[0]["PKFactura"].ToString().Trim() : String.Empty;
            Guarantee gt = new Guarantee(FKCustomer /* , FKInvoice */); //It should be the SL Custumer ID and Gurantee ID

            gvTelefonoAval.DataSource = gt.GetPhone();
            gvTelefonoAval.DataBind();
        }
Exemple #2
0
        protected void btnAddTelefonoAval_Click(object sender, EventArgs e)
        {
            lblAvalAddAddress.Visible = false;

            try
            {
                DataTable data       = Session["information"] as DataTable;
                String    FKCustomer = data.Rows.Count > 0 ? data.Rows[0]["PKCliente"].ToString().Trim() : String.Empty;
                //String FKInvoice = data.Rows.Count > 0 ? data.Rows[0]["PKFactura"].ToString().Trim() : String.Empty;
                Guarantee gt = new Guarantee(FKCustomer /*, FKInvoice */);
                gt.SavePhone(new Phone(ddlTipoTelefonoAval.SelectedItem.Text, txtAvalAddTelefonoAval.Text.Trim()));
                RestartGuaranteePhoneData();
                SetDataToGuaranteePhone();
                lblAvalAddPhone.Text     = "Teléfono guardado correctamente";
                lblAvalAddPhone.CssClass = "successfully";
                lblAvalAddPhone.Visible  = true;
            }
            catch (Exception ex)
            {
                lblAvalAddPhone.Text     = "Ha occurrido un error. Póngase en contacto con el administrador";
                lblAvalAddPhone.CssClass = "error";
                lblAvalAddPhone.Visible  = true;
            }
        }
Exemple #3
0
        protected void btnAddDomicilioAval_Click(object sender, EventArgs e)
        {
            lblAvalAddPhone.Visible = false;

            try
            {
                DataTable data       = Session["information"] as DataTable;
                String    FKCustomer = data.Rows.Count > 0 ? data.Rows[0]["PKCliente"].ToString().Trim() : String.Empty;
                //String FKInvoice = data.Rows.Count > 0 ? data.Rows[0]["PKFactura"].ToString().Trim() : String.Empty;
                Guarantee gt = new Guarantee(FKCustomer /*, FKInvoice */); //It should be the SL Custumer ID
                gt.SaveAddrees(new Address(ddlAvalTipoDomicilio.SelectedItem.Text, txtAvalAddDomicilio.Text.Trim(), txtAvalAddEntreCalles.Text.Trim(), txtAvalAddColonia.Text.Trim(), txtAvalAddCiudad.Text.Trim(), txtAvalAddCP.Text.Trim(), txtAvalAddPtoRef.Text.Trim()));
                RestartGuaranteeAddressData();
                SetDataToGuaranteeAddress();
                lblAvalAddAddress.Text     = "Domicilio guardado correctamente";
                lblAvalAddAddress.CssClass = "successfully";
                lblAvalAddAddress.Visible  = true;
            }
            catch (Exception ex)
            {
                lblAvalAddAddress.Text     = "Ha occurrido un error. Póngase en contacto con el administrador";
                lblAvalAddAddress.CssClass = "error";
                lblAvalAddAddress.Visible  = true;
            }
        }