Exemplo n.º 1
0
        public DataTable GetMenuObjectList(int PerentID, int NodLevel)
        {
            string    Sql1 = "SELECT SysID, ObgDisplayName, ObgfileName, PerentID, IconID, NodLevel FROM tblobject where PerentID=" + PerentID + " and NodLevel=" + NodLevel;
            DataTable tb   = MYCommon.GetDataTableAccount(Sql1, "get Object List");

            return(tb);
        }
Exemplo n.º 2
0
        private void frmCompanyConfig_Load(object sender, EventArgs e)
        {
            MyCom       = new CommonOperations(Program.AccountStatic.LoggingAsLocal);
            Myaccount   = new AccountCreation(Program.AccountStatic.LoggingAsLocal);
            panel1.Top  = (this.Height - panel1.Height) / 2;
            panel1.Left = (this.Width - panel1.Width) / 2;
            Myaccount.LoadSupplier(dgvList);
            DataTable tb = MyCom.GetDataTableAccount("Select CurID from tblcurrency", "xx");

            MyCom.LoadDatatoComboWithOutBind(txtCurrency, tb, "CurID", true);
        }
Exemplo n.º 3
0
        private void LoadData()
        {
            MyCommon = new CommonOperations(Program.AccountStatic.LoggingAsLocal);
            DataTable dt2 = new DataTable();

            dt2 = MyCommon.GetDataTableAccount("select * from acknoladgement", "Get Ack");

            if (dt2.Rows.Count > 0)
            {
                dataGridView1.DataSource = null;
                dataGridView1.DataSource = dt2;
            }
        }
Exemplo n.º 4
0
        //Added by Manjula
        public void FillAllDataGrid(int supid)
        {
            DataTable dt  = new DataTable();
            DataTable dt2 = new DataTable();
            DataRow   dr;
            int       Nodays = 0;
            decimal   tot30 = 0, tot45 = 0, tot60 = 0, tot90 = 0, totmore = 0, totOutstanding = 0, Fcr = 0;

            dt.Columns.Add("<30 Days");
            dt.Columns.Add("30-45 Days");
            dt.Columns.Add("45-60 Days");
            dt.Columns.Add("60-90 Days");
            dt.Columns.Add(">90 Days");
            dt.Columns.Add("Total Outstandings");

            dt2 = MyCommon.GetDataTableAccount("select DATEDIFF(CURDATE(),Billdate) as NoDays,FCr from tblpendingpayablebill  where supplier='" + supid + "' and billstatus=0", "Get Oustanding Bill");
            if (dt2.Rows.Count > 0)
            {
                #region get summery
                for (int i = 0; i < dt2.Rows.Count; i++)
                {
                    Fcr    = Convert.ToDecimal(dt2.Rows[i][1]);
                    Nodays = Convert.ToInt32(dt2.Rows[i][0]);

                    totOutstanding = totOutstanding + Fcr;

                    if (Nodays <= 30)
                    {
                        tot30 = tot30 + Fcr;
                    }

                    if (Nodays > 30 && Nodays <= 45)
                    {
                        tot45 = tot45 + Fcr;
                    }

                    if (Nodays > 45 && Nodays <= 60)
                    {
                        tot60 = tot60 + Fcr;
                    }

                    if (Nodays > 60 && Nodays <= 90)
                    {
                        tot90 = tot90 + Fcr;
                    }

                    if (Nodays > 90)
                    {
                        totmore = totmore + Fcr;
                    }
                }
                #endregion
            }

            dr = dt.NewRow();

            dr[0] = Math.Round(tot30, 2);
            dr[1] = Math.Round(tot45, 2);
            dr[2] = Math.Round(tot60, 2);
            dr[3] = Math.Round(tot90, 2);
            dr[4] = Math.Round(totmore, 2);
            dr[5] = Math.Round(totOutstanding, 2);

            dt.Rows.Add(dr.ItemArray);

            tot30 = tot45 = tot60 = tot90 = totmore = totOutstanding = 0;


            dataGridView1.DataSource = dt;
        }
Exemplo n.º 5
0
        private void frmPrintZone_Load(object sender, EventArgs e)
        {
            string ApproveDate   = "";
            string AccNo         = "";
            string TotValue      = "";
            string Payee         = "";
            string ChequeNo      = "";
            string PrepaiedDate  = "";
            string AmountInWords = "";
            string PrintCount    = "0";

            MyCommon = new CommonOperations(Program.AccountStatic.LoggingAsLocal);
            DataTable dtSingle = new DataTable();

            dtSingle = MyCommon.GetDataTableAccount("select PaymentID,FCr,AccountID,PayToName,ChequeNumber,Approvedate,AccountDate from accounterp.tblpayment where PaymentID='" + Voucherid + "'", "GetBill Data");
            if (dtSingle.Rows.Count > 0)
            {
                TotValue      = dtSingle.Rows[0][1].ToString();
                AccNo         = dtSingle.Rows[0][2].ToString();
                Payee         = dtSingle.Rows[0][3].ToString();
                ChequeNo      = dtSingle.Rows[0][4].ToString();
                ApproveDate   = dtSingle.Rows[0][5].ToString();
                PrepaiedDate  = dtSingle.Rows[0][6].ToString();
                AmountInWords = objChangeNumber.changeToWords(TotValue);
            }

            // Set the processing mode for the ReportViewer to Local
            reportViewer1.ProcessingMode = ProcessingMode.Local;
            LocalReport localReport = reportViewer1.LocalReport;

            localReport.ReportPath = "PrintPaymentVoucher.rdlc";

            ReportParameter[] reportParameterCollection = new ReportParameter[9];
            reportParameterCollection[0]      = new ReportParameter();
            reportParameterCollection[0].Name = "VoucherID";
            reportParameterCollection[0].Values.Add(Voucherid);
            reportParameterCollection[1]      = new ReportParameter();
            reportParameterCollection[1].Name = "Amount";
            reportParameterCollection[1].Values.Add(TotValue);
            reportParameterCollection[2]      = new ReportParameter();
            reportParameterCollection[2].Name = "Approvedate";
            reportParameterCollection[2].Values.Add(ApproveDate);
            reportParameterCollection[3]      = new ReportParameter();
            reportParameterCollection[3].Name = "Payee";
            reportParameterCollection[3].Values.Add(Payee);
            reportParameterCollection[4]      = new ReportParameter();
            reportParameterCollection[4].Name = "AccNo";
            reportParameterCollection[4].Values.Add(AccNo);
            reportParameterCollection[5]      = new ReportParameter();
            reportParameterCollection[5].Name = "ChequeNo";
            reportParameterCollection[5].Values.Add(ChequeNo);
            reportParameterCollection[6]      = new ReportParameter();
            reportParameterCollection[6].Name = "PrepaiedDate";
            reportParameterCollection[6].Values.Add(PrepaiedDate);
            reportParameterCollection[7]      = new ReportParameter();
            reportParameterCollection[7].Name = "AmountInWords";
            reportParameterCollection[7].Values.Add(AmountInWords);
            reportParameterCollection[8]      = new ReportParameter();
            reportParameterCollection[8].Name = "No";
            reportParameterCollection[8].Values.Add(PrintCount);

            //Load DataSet
            DataTable dt  = new DataTable();
            string    str = "select pb.pono as pono,pb.billno as billno,pb.billno as grnno,pd.Fdr as amount from tblpayablebill as pb  " +
                            "inner join tblpaymetdetails as pd on pb.BIllno=pd.JobNo where pd.PvnNo='" + Voucherid + "'";

            dt = MyCommon.GetDataTableAccount(str, "GetBill Data");

            if (dt.Rows.Count > 0)
            {
                ReportDataSource rds = new ReportDataSource("DataSetPaymentVoucher", dt);

                try
                {
                    reportViewer1.LocalReport.SetParameters(reportParameterCollection);
                    reportViewer1.LocalReport.DataSources.Add(rds);
                }
                catch (Exception ex)
                {
                }
            }

            // Refresh the report
            reportViewer1.RefreshReport();
        }