Esempio n. 1
0
 protected void btnCalcularPersonalizado_Click(object sender, EventArgs e)
 {
     if (txtmedidaDP.Text == "")
     {
         Utils.AddScriptClientUpdatePanel(panelCalcPersonalizado, "showSuccessMessage8()");
         return;
     }
     if (txtcantidadDP.Text == "")
     {
         Utils.AddScriptClientUpdatePanel(panelCalcPersonalizado, "showSuccessMessage9()");
         return;
     }
     if (ddlTipoMoldura.SelectedValue == "0")
     {
         Utils.AddScriptClientUpdatePanel(panelCalcPersonalizado, "showSuccessMessage11()");
         return;
     }
     if (ddlTipoMoldura.SelectedValue != "0")
     {
         double aprox;
         objDtoMoldura.FK_ITM_Tipo = int.Parse(ddlTipoMoldura.SelectedValue);
         aprox = objCtrMoldura.PrecioAprox(objDtoMoldura);
         int    cantp = int.Parse(txtcantidadDP.Text);
         double a     = aprox * cantp;
         txtpriceaprox.Text = Convert.ToString(a);
         if (aprox == 0)
         {
             txtpriceaprox.Text = "";
             ScriptManager.RegisterClientScriptBlock(this.Page, this.Page.GetType(), "showNotification", "showNotification('bg-red', 'No hay Tipo de moldura seleccionado!', 'bottom', 'center', null, null);", true);
             return;
         }
         UpdatePanel2.Update();
     }
 }