Beispiel #1
0
        public bool Update(EntityHandler.ChoseBank obj)
        {
            bool Status = false;
            try
            {
                string SqlCommand = "";

                Status = new DALBase().Update(SqlCommand);
            }
            catch (Exception ex)
            { }
            return Status;
        }
Beispiel #2
0
        public bool Delete(EntityHandler.VoucherType obj)
        {
            bool Status = false;
            try
            {
                string SqlCommand = "";

                Status = new DALBase().Update(SqlCommand);
            }
            catch (Exception ex)
            { }
            return Status;
        }
Beispiel #3
0
        public DataTable SelectAll(EntityHandler.VoucherType obj)
        {
            DataTable dt = new DataTable();
            try
            {
                string SqlCommand = "";

                dt = new DALBase().Select(SqlCommand);
            }
            catch (Exception ex)
            { }
            return dt;
        }
Beispiel #4
0
 public DataTable DALGetCustomerMaster()
 {
     DataTable dt = new DataTable();
     try
     {
         string SqlCommand = "SELECT * FROM [tblCustomerMaster]";
         dt = new DALBase().Select(SqlCommand);
         dt.TableName = "tblCustomerMaster";
     }
     catch (Exception ex)
     { }
     return dt;
 }
Beispiel #5
0
        public bool Insert(EntityHandler.Objects obj)
        {
            bool Status = false;
            try
            {
                string SqlCommand = "";

                Status = new DALBase().Insert(SqlCommand);
            }
            catch (Exception ex)
            { }
            return Status;
        }
Beispiel #6
0
        public DataTable DALGetMaxVoucherID()
        {
            DataTable dt = new DataTable();
            try
            {
                SqlCommand oSqlCommand = new SqlCommand();
                string SqlQuery = "WCF_MAXVoucherID";

                oSqlCommand.CommandText = SqlQuery;

                dt = new DALBase().SelectSPFinance(oSqlCommand);
                dt.TableName = "tblVoucher";
            }
            catch (Exception ex)
            { }
            return dt;
        }
Beispiel #7
0
        public DataTable SelectAll()
        {
            DataTable dt = new DataTable();
            try
            {
                SqlCommand oSqlCommand = new SqlCommand();
                string SqlQuery = "WCF_SelectBankALL";

                oSqlCommand.CommandText = SqlQuery;

                dt = new DALBase().SelectSPFinance(oSqlCommand);
                dt.TableName = "Bank";
            }
            catch (Exception ex)
            { }
            return dt;
        }
Beispiel #8
0
        public DataTable DALGetFinalCreditorSupplierList()
        {
            DataTable dt = new DataTable();
            try
            {
                SqlCommand oSqlCommand = new SqlCommand();
                string SqlQuery = "WCF_PaymentCreditorFinalSupllierList";

                oSqlCommand.CommandText = SqlQuery;

                dt = new DALBase().SelectSPMRP(oSqlCommand);
                dt.TableName = "tblSupplier";
            }
            catch (Exception ex)
            { }
            return dt;
        }
Beispiel #9
0
        public DataTable DALGetGRNMaterial(Bill objBill)
        {
            DataTable dt = new DataTable();
            try
            {
                SqlCommand oSqlCommand = new SqlCommand();
                string SqlQuery = "GetOutstandingBill";

                oSqlCommand.Parameters.AddWithValue("@SupplierID", objBill.SupplierID);
                oSqlCommand.CommandText = SqlQuery;

                dt = new DALBase().SelectSPMRP(oSqlCommand);
                dt.TableName = "tblpendingpayablebill";
            }
            catch (Exception ex)
            { }
            return dt;
        }
Beispiel #10
0
        public DataTable DALGetFinalCreditor(LINKPayment objPayment)
        {
            DataTable dt = new DataTable();
            try
            {
                SqlCommand oSqlCommand = new SqlCommand();
                string SqlQuery = "WCF_PaymentCreditorFinal";

                oSqlCommand.Parameters.AddWithValue("@SupName", objPayment.SupName);
                oSqlCommand.CommandText = SqlQuery;

                dt = new DALBase().SelectSPMRP(oSqlCommand);
                dt.TableName = "tblSupplier";
            }
            catch (Exception ex)
            { }
            return dt;
        }
Beispiel #11
0
        public DataTable SelectAll(EntityHandler.Bank objBank)
        {
            DataTable dt = new DataTable();
            try
            {
                SqlCommand oSqlCommand = new SqlCommand();
                string SqlQuery = "WCF_SelectBankAccALL";

                oSqlCommand.CommandText = SqlQuery;
                oSqlCommand.Parameters.AddWithValue("@code",objBank.Code);

                dt = new DALBase().SelectSPFinance(oSqlCommand);
                dt.TableName = "tblBankAccount";
            }
            catch (Exception ex)
            { }
            return dt;
        }
Beispiel #12
0
        public DataTable DALGetLastPayment(LINKPayment objPayment)
        {
            DataTable dt = new DataTable();
            try
            {
                SqlCommand oSqlCommand = new SqlCommand();
                string SqlQuery = "WCF_GetLastPayment";

                oSqlCommand.Parameters.AddWithValue("@SupplierID", objPayment.SupplierID);
                oSqlCommand.CommandText = SqlQuery;

                dt = new DALBase().SelectSPFinance(oSqlCommand);
                dt.TableName = "tblInvoice";
            }
            catch (Exception ex)
            { }
            return dt;
        }
Beispiel #13
0
        public bool DALInsertVoucherFromInvoive(LINKPayment objPayment)
        {
            bool status = false;

            try
            {
                SqlConnection conn = DALConnManager.OpenFinance();
                SqlCommand oSqlCommand = new SqlCommand();
                string SqlQuery = "WCF_PaymentInserIntoVoucherFromInvoice";

                oSqlCommand.Connection = conn;
                oSqlCommand.CommandText = SqlQuery;
                oSqlCommand.CommandType = CommandType.StoredProcedure;
                oSqlCommand.Parameters.AddWithValue("@VoucherID", objPayment.VoucherID);
                oSqlCommand.Parameters.AddWithValue("@InvoiceID", objPayment.InvoiceID);

                status = new DALBase().Insert(oSqlCommand);
                DALConnManager.Close(conn);


            }
            catch (Exception ex)
            {
                //StreamWriter file2 = new StreamWriter(@"c:\file.txt", true);
                //file2.WriteLine(ex.ToString() + "- " + DateTime.Now + "- DAL");
                //file2.Close();
            }

            return status;
        }
Beispiel #14
0
        public bool DALUpdateMaterial(LINKPayment objPayment)
        {
            bool result = false;

            try
            {
                SqlCommand oSqlCommand = new SqlCommand();
                string SqlQuery = "WCF_UpdateStatusGRNMateril";
                oSqlCommand.Parameters.AddWithValue("@Status", objPayment.Status);
                oSqlCommand.Parameters.AddWithValue("@GRNNO", objPayment.GRNNo);
                oSqlCommand.Parameters.AddWithValue("@MaterialCode", objPayment.MaterialCode);
                oSqlCommand.CommandText = SqlQuery;
                result = new DALBase().UpdateMRP(oSqlCommand);
            }
            catch (Exception ex)
            {

                StreamWriter file2 = new StreamWriter(@"c:\file.txt", true);
                file2.WriteLine(ex.ToString() + "- " + DateTime.Now + "- meeeeeeeeeeeee");
                file2.Close();
            }

            return result;
        }
Beispiel #15
0
        public DataTable DALGetGRNMaterial(LINKPayment objPayment)
        {
            DataTable dt = new DataTable();
            try
            {
                SqlCommand oSqlCommand = new SqlCommand();
                string SqlQuery = "WCF_GRNMaterials";

                oSqlCommand.Parameters.AddWithValue("@GRNNO", objPayment.GRNNo);
                oSqlCommand.Parameters.AddWithValue("@Status", objPayment.Status);
                oSqlCommand.CommandText = SqlQuery;

                dt = new DALBase().SelectSPMRP(oSqlCommand);
                dt.TableName = "tblGRNMaterials";
            }
            catch (Exception ex)
            { }
            return dt;
        }
Beispiel #16
0
        public bool DALInsertInvoice(LINKPayment objPayment)
        {
            bool status = false;

            try
            {
                SqlConnection conn = DALConnManager.OpenFinance();
                SqlCommand oSqlCommand = new SqlCommand();
                string SqlQuery = "WCF_PaymentInserIntoInvoice";

                oSqlCommand.Connection = conn;
                oSqlCommand.CommandText = SqlQuery;
                oSqlCommand.CommandType = CommandType.StoredProcedure;
                oSqlCommand.Parameters.AddWithValue("@InvoiceID", objPayment.InvoiceID);
                oSqlCommand.Parameters.AddWithValue("@ID", objPayment.ID);
                oSqlCommand.Parameters.AddWithValue("@InvoiceDate", objPayment.InvoiceDate);
                oSqlCommand.Parameters.AddWithValue("@Value", objPayment.Value);
                oSqlCommand.Parameters.AddWithValue("@CreateDate", objPayment.CreateDate);
                oSqlCommand.Parameters.AddWithValue("@CreateUser", objPayment.CreateUser);
                oSqlCommand.Parameters.AddWithValue("@Modifieddate", objPayment.Modifieddate);
                oSqlCommand.Parameters.AddWithValue("@ModifiedUser", objPayment.ModifiedUser);
                oSqlCommand.Parameters.AddWithValue("@Status", objPayment.Status);
                oSqlCommand.Parameters.AddWithValue("@SupplierID", objPayment.SupplierID);

                status = new DALBase().Insert(oSqlCommand);
                DALConnManager.Close(conn);


            }
            catch (Exception ex)
            {
            }

            return status;
        }
Beispiel #17
0
        public bool DALInsertInvoiceFromGRN(LINKPayment objPayment)
        {
            bool status = false;

            try
            {
                SqlConnection conn = DALConnManager.OpenFinance();
                SqlCommand oSqlCommand = new SqlCommand();
                string SqlQuery = "WCF_PaymentInserIntoInvoiceFromGRN";

                oSqlCommand.Connection = conn;
                oSqlCommand.CommandText = SqlQuery;
                oSqlCommand.CommandType = CommandType.StoredProcedure;
                oSqlCommand.Parameters.AddWithValue("@InvoiceID", objPayment.InvoiceID);
                oSqlCommand.Parameters.AddWithValue("@GRNNo", objPayment.GRNNo);

                status = new DALBase().Insert(oSqlCommand);
                DALConnManager.Close(conn);


            }
            catch (Exception ex)
            {
            }

            return status;
        }
Beispiel #18
0
        public bool DALVoucherIDStatus(LINKPayment objPayment)
        {
            bool status = false;
            int GRNstatus = 9;

            try
            {
                SqlConnection conn = DALConnManager.OpenFinance();
                SqlCommand oSqlCommand = new SqlCommand();
                string SqlQuery = "WCF_UpdateStatustblVoucher";

                oSqlCommand.Connection = conn;
                oSqlCommand.CommandText = SqlQuery;
                oSqlCommand.CommandType = CommandType.StoredProcedure;
                oSqlCommand.Parameters.AddWithValue("@Status", GRNstatus);
                oSqlCommand.Parameters.AddWithValue("@VoucherID", objPayment.VoucherID);
                oSqlCommand.Parameters.AddWithValue("@ApproveDate", objPayment.ApproveDate);

                status = new DALBase().Insert(oSqlCommand);
                DALConnManager.Close(conn);


            }
            catch (Exception ex)
            {

            }

            return status;
        }
Beispiel #19
0
        public DataTable DALGetInvoiceALL()
        {
            DataTable dt = new DataTable();
            try
            {
                SqlCommand oSqlCommand = new SqlCommand();
                string SqlQuery = "WCF_SelectInvoiceALL";

                oSqlCommand.CommandText = SqlQuery;

                dt = new DALBase().SelectSPFinance(oSqlCommand);
                dt.TableName = "tblInvoice";
            }
            catch (Exception ex)
            { }
            return dt;
        }
Beispiel #20
0
        //Update MRP Database
        public bool DALGRNStatus(LINKPayment objPayment)
        {
            bool status = false;
            int GRNstatus = 9;

            try
            {
                SqlConnection conn = DALConnManager.OpenMRP();
                SqlCommand oSqlCommand = new SqlCommand();
                string SqlQuery = "WCF_UpdateStatusGRN";

                oSqlCommand.Connection = conn;
                oSqlCommand.CommandText = SqlQuery;
                oSqlCommand.CommandType = CommandType.StoredProcedure;
                oSqlCommand.Parameters.AddWithValue("@Status", GRNstatus);
                oSqlCommand.Parameters.AddWithValue("@GRNNo", objPayment.GRNNo);

                status = new DALBase().Insert(oSqlCommand);
                DALConnManager.Close(conn);


            }
            catch (Exception ex)
            {

            }

            return status;
        }