Beispiel #1
0
        public bool BALUpdateVoucher(LINKPayment objPayment)
        {
            bool status = false;

            try
            {
                DataAccessHandler.Voucher objDALPayment = new DataAccessHandler.Voucher();

                //update tblGRN set status=9
                status = objDALPayment.DALVoucherIDStatus(objPayment);
            }
            catch (Exception ex)
            {
            }
            return(status);
        }
Beispiel #2
0
        public List<LINKPayment> BALGetInvoice(LINKPayment objPayment)
        {
            List<LINKPayment> listobj = new List<LINKPayment>();
            DataTable dt = new DataTable();
            try
            {
                DataAccessHandler.Voucher objDALPayment = new DataAccessHandler.Voucher();
                dt = objDALPayment.DALGetInvoice(objPayment);

                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    listobj.Add(ConvertToObjectInvoice(dt.Rows[i]));
                }
            }
            catch (Exception ex)
            {

            }

            return listobj;
        }
Beispiel #3
0
        public List <LINKPayment> BALGetLastPayment(LINKPayment objPayment)
        {
            List <LINKPayment> listobj = new List <LINKPayment>();
            DataTable          dt      = new DataTable();

            try
            {
                DataAccessHandler.Voucher objDALPayment = new DataAccessHandler.Voucher();
                dt = objDALPayment.DALGetLastPayment(objPayment);

                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    listobj.Add(ConvertToObjectLastPayment(dt.Rows[i]));
                }
            }
            catch (Exception ex)
            {
            }

            return(listobj);
        }
Beispiel #4
0
        public int BALGetMAXVoucherID()
        {
            int       getID = 0;
            DataTable dt    = new DataTable();

            try
            {
                DataAccessHandler.Voucher objDALPayment = new DataAccessHandler.Voucher();
                dt = objDALPayment.DALGetMaxVoucherID();

                if (dt.Rows.Count > 0)
                {
                    getID = Convert.ToInt32(dt.Rows[0][0].ToString());
                }
            }
            catch (Exception ex)
            {
            }

            return(getID);
        }
Beispiel #5
0
        public bool BALInsertInvoice(LINKPayment objPayment, List <LINKPayment> objLists)
        {
            bool status = false;

            try
            {
                DataAccessHandler.Voucher objDALPayment = new DataAccessHandler.Voucher();
                LINKPayment objLink = new LINKPayment();

                if (objLists.Count > 0)
                {
                    status = objDALPayment.DALInsertInvoice(objPayment);

                    if (status)
                    {
                        foreach (LINKPayment objList in objLists)
                        {
                            objLink.GRNNo     = objList.GRNNo;
                            objLink.InvoiceID = objList.InvoiceID;

                            status = objDALPayment.DALInsertInvoiceFromGRN(objLink);

                            //update tblGRN set status=9  MRP DB
                            if (status)
                            {
                                status = objDALPayment.DALGRNStatus(objLink);
                            }
                        }
                    }

                    if (status)
                    {
                    }
                }
            }
            catch (Exception ex)
            {
            }
            return(status);
        }
Beispiel #6
0
         public bool BALUpdateVoucher(LINKPayment objPayment)
         {
             bool status = false;

             try
             {
                 DataAccessHandler.Voucher objDALPayment = new DataAccessHandler.Voucher();

                 //update tblGRN set status=9
                 status = objDALPayment.DALVoucherIDStatus(objPayment);


             }
             catch (Exception ex)
             {

             }
             return status;
         }
Beispiel #7
0
         public bool BALInsertVoucher(LINKPayment objPayment, List<LINKPayment> objLists)
        {
            bool status = false;

            try
            {
                DataAccessHandler.Voucher objDALPayment = new DataAccessHandler.Voucher();
                LINKPayment objLink = new LINKPayment();

                if (objLists.Count > 0)
                {
                    status = objDALPayment.DALInsertVoucher(objPayment);

                    if (status)
                    {
                        foreach (LINKPayment objList in objLists)
                        {
                            objLink.VoucherID = objList.VoucherID;
                            objLink.InvoiceID = objList.InvoiceID;

                            status = objDALPayment.DALInsertVoucherFromInvoive(objLink);


                            if (status)
                            {
                                //update tblGRN set status=9
                                status = objDALPayment.DALInvoiceStatus(objLink);
                            }

                        }
                    }

                }

            }
            catch (Exception ex)
            {

            }
            return status;
        }
Beispiel #8
0
        public int BALGetMAXVoucherID()
        {
            int getID = 0;
            DataTable dt = new DataTable();
            try
            {
                DataAccessHandler.Voucher objDALPayment = new DataAccessHandler.Voucher();
                dt = objDALPayment.DALGetMaxVoucherID();

                if (dt.Rows.Count > 0)
                {
                    getID = Convert.ToInt32(dt.Rows[0][0].ToString());
                }
            }
            catch (Exception ex)
            {

            }

            return getID;
        }