Ejemplo n.º 1
0
 protected void btnPintFacture_Click(object sender, EventArgs e)
 {
     if (GXGridView1.SelectedIndex != -1)
     {
         Broker.DataAccess.Facture f;
         if (GXGridView1.SelectedValue != null)
         {
             int GXgvSelectedValue = Convert.ToInt32(GXGridView1.SelectedValue);
             f = Broker.DataAccess.Facture.Get(GXgvSelectedValue);
         }
         else
         {
             int GXgvSelectedValue = GXGridView1SelectedValue;
             f = Broker.DataAccess.Facture.Get(GXgvSelectedValue);
         }
         btnNew.CssClass                = "novZapis";
         btnFactureItems.CssClass       = "prikaz";
         btnPreview.CssClass            = "osvezi";
         btnReport.CssClass             = "izvestaj";
         btnSearch.CssClass             = "prebaraj";
         btnFactureItems.CssClass       = "prikaz";
         btnPintFacture.CssClass        = "pecati_Active";
         btnChangeStatus.CssClass       = "promeniStatus";
         btnPrintAnex.CssClass          = "dogovor";
         btnPaymentsPerFacture.CssClass = "plakanja";
         PrintFactures.PrintFacture(f);
     }
 }
Ejemplo n.º 2
0
 protected void btnPrint_Click(object sender, EventArgs e)
 {
     if (FactureID > 0)
     {
         Broker.DataAccess.Facture f = Broker.DataAccess.Facture.Get(FactureID);
         PrintFactures.PrintFacture(f);
     }
 }
Ejemplo n.º 3
0
 protected void btnPintFacture_Click(object sender, EventArgs e)
 {
     if (GXGridView1.SelectedIndex != -1)
     {
         Broker.DataAccess.Facture f;
         if (GXGridView1.SelectedValue != null)
         {
             int GXgvSelectedValue = Convert.ToInt32(GXGridView1.SelectedValue);
             f = Broker.DataAccess.Facture.Get(GXgvSelectedValue);
         }
         else
         {
             int GXgvSelectedValue = GXGridView1SelectedValue;
             f = Broker.DataAccess.Facture.Get(GXgvSelectedValue);
         }
         if (f.DocumentSubType.Code == DocumentSubType.FAKTURA_KLIENT)
         {
             List <PolicyItemFactureItem> pifi = PolicyItemFactureItem.GetByFactureID(f.ID);
             if (pifi[0].PolicyItem.Rates.Count > 0)
             {
                 btnFactureItems.CssClass = "prikaz";
                 btnPreview.CssClass      = "osvezi";
                 btnReport.CssClass       = "izvestaj";
                 btnSearch.CssClass       = "prebaraj";
                 btnFactureItems.CssClass = "prikaz";
                 btnPintFacture.CssClass  = "pecati_Active";
                 btnChangeStatus.CssClass = "promeniStatus";
                 btnPrintAnex.CssClass    = "dogovor";
                 PrintFactures.PrintFacture(f);
             }
             else
             {
                 RegisterStartupScript("myAlert", "<script>alert('Фактурата не е договорена за плаќање на рати!')</script>");
             }
         }
         else
         {
             RegisterStartupScript("myAlert", "<script>alert('Фактурата не е договорена за плаќање на рати!')</script>");
         }
     }
 }