Exemplo n.º 1
0
 public virtual void Fill()
 {
     this.PreFill();
     this.dsS_OD_REKAP_OLAKSICEDataSet1 = new S_OD_REKAP_OLAKSICEDataSet();
     this.m_StartRow    = 0;
     this.Cursor        = Cursors.WaitCursor;
     this.m_GridLoading = true;
     ThreadPool.QueueUserWorkItem(new WaitCallback(this.FillDataThread), Thread.CurrentPrincipal);
 }
Exemplo n.º 2
0
 public virtual int Fill(S_OD_REKAP_OLAKSICEDataSet dataSet)
 {
     if (this.fillDataParameters == null)
     {
         throw new ArgumentException();
     }
     this.Fill(dataSet, this.fillDataParameters[0].Value.ToString());
     return(0);
 }
Exemplo n.º 3
0
 public virtual int FillPage(S_OD_REKAP_OLAKSICEDataSet dataSet, int startRow, int maxRows)
 {
     if (this.fillDataParameters == null)
     {
         throw new ArgumentException();
     }
     this.FillPage(dataSet, this.fillDataParameters[0].Value.ToString(), startRow, maxRows);
     return(0);
 }
Exemplo n.º 4
0
 public virtual int Fill(DataSet dataSet)
 {
     this.S_OD_REKAP_OLAKSICESet = (S_OD_REKAP_OLAKSICEDataSet)dataSet;
     if (this.S_OD_REKAP_OLAKSICESet != null)
     {
         return(this.Fill(this.S_OD_REKAP_OLAKSICESet));
     }
     this.S_OD_REKAP_OLAKSICESet = new S_OD_REKAP_OLAKSICEDataSet();
     this.Fill(this.S_OD_REKAP_OLAKSICESet);
     dataSet.Merge(this.S_OD_REKAP_OLAKSICESet);
     return(0);
 }
Exemplo n.º 5
0
 public virtual int FillPage(DataSet dataSet, int startRow, int maxRows)
 {
     this.S_OD_REKAP_OLAKSICESet = (S_OD_REKAP_OLAKSICEDataSet)dataSet;
     if (this.S_OD_REKAP_OLAKSICESet != null)
     {
         return(this.FillPage(this.S_OD_REKAP_OLAKSICESet, startRow, maxRows));
     }
     this.S_OD_REKAP_OLAKSICESet = new S_OD_REKAP_OLAKSICEDataSet();
     this.FillPage(this.S_OD_REKAP_OLAKSICESet, startRow, maxRows);
     dataSet.Merge(this.S_OD_REKAP_OLAKSICESet);
     return(0);
 }
Exemplo n.º 6
0
 public virtual int FillPage(S_OD_REKAP_OLAKSICEDataSet dataSet, string iDOBRACUN, int startRow, int maxRows)
 {
     this.Initialize();
     this.connDefault            = this.dsDefault.GetReadWriteConnection(this.daCurrentTransaction);
     this.S_OD_REKAP_OLAKSICESet = dataSet;
     this.rowS_OD_REKAP_OLAKSICE = this.S_OD_REKAP_OLAKSICESet.S_OD_REKAP_OLAKSICE.NewS_OD_REKAP_OLAKSICERow();
     this.SetFillParameters(iDOBRACUN);
     this.AV8IDOBRAC = iDOBRACUN;
     try
     {
         this.executePrivate(startRow, maxRows);
     }
     finally
     {
         this.Cleanup();
     }
     return(0);
 }
Exemplo n.º 7
0
        private bool SnimiDisketuZaHZZO(string strNazivDatoteke)
        {
            bool flag = false;

            if (this.olaksica == -1)
            {
                Interaction.MsgBox("Potrebno je odabrati olakšicu za koju želite izraditi datoteku", MsgBoxStyle.OkOnly, null);
                return(flag);
            }
            try
            {
                IEnumerator    enumerator    = null;
                SqlConnection  connection    = new SqlConnection(Configuration.ConnectionString);
                SqlCommand     selectCommand = new SqlCommand();
                SqlDataAdapter adapter       = new SqlDataAdapter(selectCommand);
                selectCommand.Connection = connection;
                S_OD_REKAP_OLAKSICEDataAdapter adapter2 = new S_OD_REKAP_OLAKSICEDataAdapter();
                S_OD_REKAP_OLAKSICEDataSet     dataSet  = new S_OD_REKAP_OLAKSICEDataSet();
                object obj2 = adapter2.Fill(dataSet, this.Obracun);
                if (dataSet.Tables[0].Rows.Count == 0)
                {
                    MessageBox.Show("Ne postoje obračunate olakšice!");
                    return(flag);
                }
                DataView view = new DataView {
                    Table = dataSet.S_OD_REKAP_OLAKSICE
                };
                decimal      num3   = DB.N20(RuntimeHelpers.GetObjectValue(view.Table.Compute("Sum(IZNOSOLAKSICE)", "IDOLAKSICE=" + Conversions.ToString(this.olaksica))));
                decimal      num    = DB.N20(RuntimeHelpers.GetObjectValue(view.Table.Compute("count(idradnik)", "IDOLAKSICE=" + Conversions.ToString(this.olaksica))));
                StreamWriter writer = new StreamWriter(strNazivDatoteke, false, Encoding.ASCII);
                writer.Write("0:5924-");
                writer.Write(DB.BrojVodeceNule(this.rkdp.Text, 5, 0, false, ""));
                string strPoziv = this.sifraugovaratelja.Text + "90";
                strPoziv = strPoziv + Razno.KontrolniBroj(strPoziv);
                writer.Write("-");
                writer.Write(strPoziv);
                writer.Write(":");
                writer.Write(this.nazivkorisnika);
                writer.Write("  :");
                writer.Write(Conversions.ToDate(this.datum.Value).ToString("dd.MM.yyyy"));
                writer.Write(":  ");
                writer.Write(num3.ToString("0.00").Replace(",", "."));
                writer.Write(":" + Conversions.ToString(num));
                writer.WriteLine(":");
                int num2 = 0;
                try
                {
                    enumerator = view.Table.Rows.GetEnumerator();
                    while (enumerator.MoveNext())
                    {
                        DataRow current = (DataRow)enumerator.Current;
                        if (Operators.ConditionalCompareObjectEqual(current["idolaksice"], this.olaksica, false))
                        {
                            num2++;
                            writer.Write("1:5924-");
                            writer.Write(this.rkdp.Text + "-");
                            writer.Write(RuntimeHelpers.GetObjectValue(current["ZADPOJEDINACNIPOZIV"]));
                            writer.Write(":");
                            writer.Write(RuntimeHelpers.GetObjectValue(current["prezime"]));
                            writer.Write(Operators.ConcatenateObject(" ", current["ime"]));
                            writer.Write(":");
                            writer.Write(Conversions.ToDate(this.datum.Value).ToString("dd.MM.yyyy"));
                            writer.Write(":  ");
                            decimal num4 = Conversions.ToDecimal(current["iznosolaksice"]);
                            writer.Write(num4.ToString("0.00").Replace(",", "."));
                            writer.Write(":");
                            writer.Write(num2);
                            writer.WriteLine(":");
                        }
                    }
                }
                finally
                {
                    if (enumerator is IDisposable)
                    {
                        (enumerator as IDisposable).Dispose();
                    }
                }
                writer.Close();
                flag = true;
            }
            catch (System.Exception exception1)
            {
                throw exception1;

                //Interaction.MsgBox("Greška prilikom kreiranja datoteke za HZZO", MsgBoxStyle.OkOnly, null);
                //flag = false;
            }
            return(flag);
        }