コード例 #1
0
 /// <summary>
 /// Add parameters while getting the stock details
 /// </summary>
 /// <param name="users"></param>
 /// <returns></returns>
 public IDbDataParameter[] AddParamsGetSalesDetails(SalesSearchDetails SalesSearchDetails)
 {
     parameters.Clear();
     parameters.Add(dbManager.CreateParameter("@SalesId", 9, SalesSearchDetails.SalesId, DbType.Int32));
     parameters.Add(dbManager.CreateParameter("@SalesLineId", 9, SalesSearchDetails.SalesLineId, DbType.Int32));
     parameters.Add(dbManager.CreateParameter("@SalesInvoiceNo", 100, SalesSearchDetails.SalesInvoiceNo, DbType.String));
     parameters.Add(dbManager.CreateParameter("@FromDate", SalesSearchDetails.FromDate, DbType.Date));
     parameters.Add(dbManager.CreateParameter("@ToDate", SalesSearchDetails.ToDate, DbType.Date));
     parameters.Add(dbManager.CreateParameter("@CustomerName", 100, SalesSearchDetails.CustomerName, DbType.String));
     parameters.Add(dbManager.CreateParameter("@CustomerMobileNo", 14, SalesSearchDetails.CustomerMobileNo, DbType.Double));
     parameters.Add(dbManager.CreateParameter("@BrandCode", 9, SalesSearchDetails.BrandCode, DbType.Int32));
     parameters.Add(dbManager.CreateParameter("@BrandName", 200, SalesSearchDetails.BrandName, DbType.String));
     parameters.Add(dbManager.CreateParameter("@OperationType", 2, SalesSearchDetails.OperationType, DbType.Int16));
     return(parameters.ToArray());
 }
コード例 #2
0
 private void GetDataGridDetails()
 {
     try
     {
         var SalesSearchDetails = new SalesSearchDetails
         {
             SalesInvoiceNo   = SalesInvoiceNo,
             BrandName        = BrandName,
             BrandCode        = BrandCode,
             FromDate         = FromDate,
             ToDate           = ToDate,
             CustomerName     = CustomerName,
             CustomerMobileNo = CustomerMobileNo,
             SalesId          = SalesId,
             SalesLineId      = SalesLineId,
             OperationType    = OperationType
         };
         if (OperationType != 3)
         {
             DtGridHeader.Clear();
             DtGridHeader = _SalesRepository.GetSalesDetails(SalesSearchDetails);
             LoadDataToHeaderGrid();
         }
         else
         {
             DtGridList.Clear();
             DtGridList = _SalesRepository.GetSalesDetails(SalesSearchDetails);
             LoadDataToListGrid();
         }
     }
     catch (Exception _exception)
     {
         CmC.InsertException(_exception);
         messageShow.singlemsgtext(CmC.ExceptionErrorMessage);
     }
 }
コード例 #3
0
        /// <summary>
        /// To get the sales list for header and line..
        /// </summary>
        /// <param name="users"></param>
        /// <returns></returns>
        public DataTable GetSalesDetails(SalesSearchDetails SalesSearchDetails)
        {
            var DbManager = new DBManager("DBConnection");

            return(DbManager.GetDataTable(_StoredProcedures.GetSalesDetails_SP, CommandType.StoredProcedure, _SalesIRepository.AddParamsGetSalesDetails(SalesSearchDetails)));
        }