Esempio n. 1
0
        public GetDcDetailsForInvoiceQM GetDcDetailsForInvoice(string DcNumber)
        {
            var response = new GetDcDetailsForInvoiceQM();

            using (var connection = new DbConnectionProvider().CreateConnection())
            {
                connection.Open();

                var command = new GetDcDetailsForInvoiceSelectCommand {
                    Connection = connection
                };
                response = command.Execute(DcNumber);
            }

            return(response);
        }
Esempio n. 2
0
        public void AddInvoiceMaster(string InvoiceNumber, DateTime InvoiceDate, string DcNumber, string WoType, Int64 VendorCode, string Tariff, string Vehicle,
                                     string EWayBill, decimal CGSTPercent, decimal SGSTPercent, decimal IGSTPercent, decimal ValuesOfGoods, decimal CGSTAmount, decimal SGSTAmount,
                                     decimal IGSTAmount, decimal GrandTotal, decimal RoundOff, decimal FineTotal, bool PrintTag)
        {
            var response = new GetDcDetailsForInvoiceQM();

            using (var connection = new DbConnectionProvider().CreateConnection())
            {
                connection.Open();

                var command = new InvoiceMasterInsertCommand {
                    Connection = connection
                };
                command.Execute(InvoiceNumber, InvoiceDate, DcNumber, WoType, VendorCode, Tariff, Vehicle, EWayBill, CGSTPercent, SGSTPercent, IGSTPercent, ValuesOfGoods,
                                CGSTAmount, SGSTAmount, IGSTAmount, GrandTotal, RoundOff, FineTotal, PrintTag);
            }
        }
        public GetDcDetailsForInvoiceQM Execute(string DcNumber)
        {
            var response = new GetDcDetailsForInvoiceQM();

            using (var sqlCommand = CreateCommand())
            {
                sqlCommand.Connection  = Connection;
                sqlCommand.CommandText = "[dbo].[uspGetDcDetailsForInvoice]";
                sqlCommand.CommandType = CommandType.StoredProcedure;
                sqlCommand.Parameters.Add(AddParameter("@DcNumber", SsDbType.NVarChar, ParameterDirection.Input, DcNumber));

                using (var reader = SsDbCommandHelper.ExecuteReader(sqlCommand))
                {
                    response.GetDcDetailsForInvoiceModel = reader.ToList <GetDcDetailsForInvoiceModel>();
                }
            }
            return(response);
        }