Example #1
0
 public DataTable SelectAllShop()
 {
     DataTable companyTable = new DataTable();
         DataAccessManager dam = new DataAccessManager();
         companyTable = dam.GetDataTable(CommandType.StoredProcedure, "SelectShop");
         return companyTable;
 }
Example #2
0
        public static DataTable Select(string UserId, string StartTicks, string EndTicks)
        {
            DataTable dt = null;

            DataAccessManager dam = new DataAccessManager();
            string[,] paramArray = { {"@UserId", UserId},
                                   {"@StartTicks", StartTicks},
                                   {"@EndTicks", EndTicks}};
            dt = dam.GetDataTable(CommandType.StoredProcedure, "SelectUserLog", paramArray);

            return dt;
        }
Example #3
0
        public DataTable SelectAllActiveCompanies()
        {
            DataTable companyTable = new DataTable();
            try
            {
                DataAccessManager dam = new DataAccessManager();

                companyTable = dam.GetDataTable(CommandType.StoredProcedure, "SelectCompany");
            }
            catch (Exception ex)
            {

                throw ex;
            }
            return companyTable;
        }
Example #4
0
        public static DataTable SelectRecentReceipt()
        {
            DataTable dt = null;
            try
            {
                dt = new DataTable();
                DataAccessManager dam = new DataAccessManager();
                dt = dam.GetDataTable(CommandType.StoredProcedure, "RecentTopReceipt");
            }
            catch (Exception exe)
            {

                throw exe;
            }
            return dt;
        }
Example #5
0
 public DataTable SelectAllItemTypes(string isActive)
 {
     DataTable companyTable = new DataTable();
     try
     {
         DataAccessManager dam = new DataAccessManager();
         string[,] paramArray = {
                                    {"@isActive",isActive}
                                };
         companyTable = dam.GetDataTable(CommandType.StoredProcedure, "SelectItemType", paramArray);
     }
     catch (Exception ex)
     {
         throw ex;
     }
     return companyTable;
 }
Example #6
0
 public static DataTable SelectReceipt(string ReceiptId)
 {
     DataTable dt = new DataTable();
     try
     {
         DataAccessManager dam = new DataAccessManager();
         string[,] paramArray = {
                 { "@ReceiptId", ReceiptId }
                                    };
         dt = dam.GetDataTable(CommandType.StoredProcedure, "SelectReceipt", paramArray, "Receipt");
     }
     catch (Exception ex)
     {
         throw ex;
     }
     return dt;
 }
Example #7
0
 public DataTable BuyerLedger(DateTime? StartDate, DateTime? EndDate, string Id)
 {
     DataTable dt = null;
     try
     {
         string[,] paramArray = {
                         {"@StartDate", Common.FormateDateForDB(StartDate)},
                         {"@EndDate",  Common.FormateDateForDB(EndDate)},
                         {"@Id", Id}
                                };
         DataAccessManager dam = new DataAccessManager();
         dt = dam.GetDataTable(CommandType.StoredProcedure, "Report_BuyerLedger", paramArray);
     }
     catch (Exception ex)
     {
         throw ex;
     }
     return dt;
 }
Example #8
0
 public static DataTable ViewExceptionLog(string startDate,string endDate,string Module)
 {
     DataTable datatableException = new DataTable();
     try
     {
         DataAccessManager dam = new DataAccessManager();
         string[,] pararray = {
                              {"@StartDate",startDate},
                              {"@EndDate",endDate},
                              {"@Module",Module}
                              };
         datatableException = dam.GetDataTable(CommandType.StoredProcedure, "SelectExceptionLog",pararray);
     }
     catch (Exception exe)
     {
         throw exe;
     }
     return datatableException;
 }
Example #9
0
 public DataTable ProfitLoassReport(DateTime? StartDate, DateTime? EndDate, string reportLevel)
 {
     DataTable dt = null;
     try
     {
         string[,] paramArray = {
                         {"@StartDate", Common.FormateDateForDB(StartDate)},
                         {"@EndDate",  Common.FormateDateForDB(EndDate)},
                         {"@Level", reportLevel}
                                };
         DataAccessManager dam = new DataAccessManager();
         dt = dam.GetDataTable(CommandType.StoredProcedure, "Report_ProfitLost", paramArray);
     }
     catch (Exception ex)
     {
         throw ex;
     }
     return dt;
 }
Example #10
0
 private DataTable SalesPurchaseReport(string report, string StartDate, string EndDate, string Id)
 {
     DataTable dt = null;
     try
     {
         string[,] paramArray = {
                         {"@Report",report},
                         {"@StartDate",StartDate},
                         {"@EndDate", EndDate},
                         {"@Id", Id}
                                };
         DataAccessManager dam = new DataAccessManager();
         dt = dam.GetDataTable(CommandType.StoredProcedure, "Report_SalesPurchase", paramArray);
     }
     catch (Exception ex)
     {
         throw ex;
     }
     return dt;
 }
Example #11
0
 public DataTable CurrentCashReport()
 {
     DataTable ds = null;
     try
     {
         DataAccessManager dam = new DataAccessManager();
         ds = dam.GetDataTable(CommandType.StoredProcedure, "Report_CurrentCashReport");
     }
     catch (Exception ex)
     {
         throw ex;
     }
     return ds;
 }
Example #12
0
 public DataTable ProductTransactionSummaryReprot(string StartDate, string EndDate, string Id)
 {
     DataTable dt = null;
     try
     {
         string[,] paramArray = {
                         {"@StartDate",StartDate},
                         {"@EndDate", EndDate},
                         {"@Id", Id}
                                };
         DataAccessManager dam = new DataAccessManager();
         dt = dam.GetDataTable(CommandType.StoredProcedure, "Report_ProductInOutSummaryReport", paramArray);
     }
     catch (Exception ex)
     {
         throw ex;
     }
     return dt;
 }
Example #13
0
        public DataTable SelectAllCompanies()
        {
            DataTable companyTable = new DataTable();
            try
            {
                DataAccessManager dam = new DataAccessManager();
                string[,] paramArray = {
                {"@OnlyActive", "0"}
               };
                companyTable = dam.GetDataTable(CommandType.StoredProcedure, "SelectCompany", paramArray);
            }
            catch (Exception ex)
            {

                throw ex;
            }
            return companyTable;
        }
Example #14
0
        /*

        @ItemId int=null,
        @ItemCode nvarchar(500) = null,
        @ItemName nvarchar(500) = null,
        @ItemType int = null,
        @CompanyId

        */
        public DataTable SelectItem(string ItemId, string ItemCode, string ItemName, string ItemType, string CompanyId, string isActive, int Operation)
        {
            DataTable companyTable = new DataTable();
            try
            {
                DataAccessManager dam = new DataAccessManager();
                string[,] paramArray = {{"@ItemId", ItemId},
                                       {"@ItemCode", ItemCode },
                                       {"@ItemName", ItemName },
                                       {"@ItemType", ItemType },
                                       {"@CompanyId", CompanyId },
                                       {"@isActive", isActive },
                                        {"@Operation", Operation.ToString() }
                                       };
                companyTable = dam.GetDataTable(CommandType.StoredProcedure, "SelectItem", paramArray);
            }
            catch (Exception ex)
            {

                throw ex;
            }
            return companyTable;
        }
Example #15
0
 public DataTable SelectCompanyTransactions(string fromDate, string toDate, string Id)
 {
     DataTable companyTable = new DataTable();
     try
     {
         DataAccessManager dam = new DataAccessManager();
         string[,] paramArray = {
                                 {"@CustomerCompanyId",Id},
                                 {"@FromTransactionDate",fromDate},
                                 {"@ToTransactionDate", toDate },
                                 {"@IsCustomer", "0"}
                             };
         companyTable = dam.GetDataTable(CommandType.StoredProcedure, "SelectTransactions", paramArray);
     }
     catch (Exception ex)
     {
         throw ex;
     }
     return companyTable;
 }
Example #16
0
        //RECEIPT
        public DataTable SelectReceiptsDateWise(string CustomerId, DateTime StartDate, DateTime EndDate, bool All)
        {
            DataTable dt = new DataTable();
            try
            {
                StartDate = StartDate.Date.AddMilliseconds(-1);
                EndDate = EndDate.Date.AddDays(1).AddMilliseconds(-1);
                DataAccessManager dam = new DataAccessManager();
                string[,] paramArray = {
                        { "@CustomerId", All?null:CustomerId} ,
                        { "@StartDate", All?null:Common.FormateDateForDB(StartDate)} ,
                        { "@EndDate", All?null:Common.FormateDateForDB(EndDate)}
                                           };

                dt = dam.GetDataTable(CommandType.StoredProcedure, "SelectReceiptSummary", paramArray, "Receipt");
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return dt;
        }
Example #17
0
        public static bool IsCurrentDateValid()
        {
            bool result = false;
            DataAccessManager dam = new DataAccessManager();
            string[,] pararray = { { "@FromTransactionDate", FormateDateForDB(DateTime.Now.AddDays(1)) } };
            DataTable dt = dam.GetDataTable(CommandType.StoredProcedure, "SelectTransactions", pararray);

            if (dt != null)
                result = dt.Rows.Count > 1;
            return !result;
        }
Example #18
0
        public DataTable SelectEmptyReceiptDetailTable()
        {
            DataTable table = new DataTable();
            try
            {
                DataAccessManager dam = new DataAccessManager();
                string[,] paramArray = { { "@TableName", "ReceiptDetail" } };
                table = dam.GetDataTable(CommandType.StoredProcedure, "SelectEmptyTable", paramArray);
            }
            catch (Exception ex)
            {

                throw ex;
            }
            return table;
        }
Example #19
0
 public DataTable CompanyPurchaseReport(DateTime? StartDate, DateTime? EndDate, string Id, bool IsDetailed)
 {
     DataTable dt = null;
     try
     {
         string[,] paramArray = {
                         {"@StartDate", Common.FormateDateForDB(StartDate)},
                         {"@EndDate",  Common.FormateDateForDB(EndDate)},
                         {"@Id", Id},
                         {"@InDetail", IsDetailed?"1":"0"}
                                };
         DataAccessManager dam = new DataAccessManager();
         dt = dam.GetDataTable(CommandType.StoredProcedure, "Report_CompanyPurchaseReport", paramArray);
     }
     catch (Exception ex)
     {
         throw ex;
     }
     return dt;
 }
Example #20
0
 public static DataTable Login(string UserName, string Password)
 {
     DataTable dt = null;
     DataAccessManager dam = new DataAccessManager();
     string[,] paramArray = {
                                {"@UserName",UserName},
                                {"@Password",Password}
                            };
     dt = dam.GetDataTable(System.Data.CommandType.StoredProcedure, "SystemUserLogin", paramArray);
     return dt;
 }
Example #21
0
        public static DataTable SelectUser(string Id, string UserName, string FullName)
        {
            DataTable dtUser = null;
            try
            {

                dtUser = new DataTable();
                DataAccessManager dam = new DataAccessManager();
                string[,] pararray = {
                                     {"@Id",Id},
                                      {"@UserName",UserName},
                                      {"@Name",FullName},

                                     };

                dtUser = dam.GetDataTable(CommandType.StoredProcedure, "SelectUser", pararray);
            }
            catch (Exception exe)
            {

                throw exe;
            }
            return dtUser;
        }
Example #22
0
        public DataTable Stock()
        {
            DataTable stockTable = new DataTable();
            try
            {
                DataAccessManager dam = new DataAccessManager();
                stockTable = dam.GetDataTable(CommandType.StoredProcedure, "Stock");
            }
            catch (Exception ex)
            {

                throw ex;
            }
            return stockTable;
        }
Example #23
0
        public DataTable SelectCustomerByCode(string code)
        {
            DataTable companyTable = new DataTable();
            try
            {
                DataAccessManager dam = new DataAccessManager();
                string[,] paramArray = {
                                           {"@CustomerCode", code},
                                           {"@OnlyActive", "0"}
                                       };
                companyTable = dam.GetDataTable(CommandType.StoredProcedure, "SelectCustomer", paramArray);

            }
            catch (Exception ex)
            {

                throw ex;
            }
            return companyTable;
        }
Example #24
0
        public static DataTable CheckCompanyItem(string companyId, string companyItem, string Packing)
        {
            try
            {

                //int result=0;
                DataTable dt = null;
                DataAccessManager dam = new DataAccessManager();
                string[,] parayy = { {@"CompanyId",companyId}
                               ,{@"CompanyItem",companyItem},
                               {@"Packing",Packing}};
                dt = dam.GetDataTable(CommandType.StoredProcedure, "CheckCompanyItem", parayy);
                return dt;
            }
            catch (Exception exe)
            {

                throw exe;
            }
        }
Example #25
0
 public DataTable SelectCompanyByCode(string code)
 {
     DataTable companyTable = new DataTable();
         DataAccessManager dam = new DataAccessManager();
         string[,] paramArray = {
         {"@CompanyCode", code}
        };
         companyTable = dam.GetDataTable(CommandType.StoredProcedure, "SelectCompany", paramArray);
     return companyTable;
 }
Example #26
0
        public static DataTable ExecuteSelectQuery(string query)
        {
            DataTable dt = null;
            try
            {

                DataAccessManager dam = new DataAccessManager();
                dt = dam.GetDataTable(CommandType.Text, query);
            }
            catch (Exception ex)
            {
                throw;
            }
            return dt;
        }
Example #27
0
        public DataTable SelectCompanyByName(string name)
        {
            DataTable companyTable = new DataTable();
            try
            {
                DataAccessManager dam = new DataAccessManager();
                string[,] paramArray = {
                {"@CompanyName", name}
               };
                companyTable = dam.GetDataTable(CommandType.StoredProcedure, "SelectCompany", paramArray);
            }
            catch (Exception ex)
            {

                throw ex;
            }
            return companyTable;
        }