Example #1
0
        public DataSet Report_GetUserRoles(int branchId, string userIdList)
        {
            DBEgine dbEngin = new DBEgine ();
            try
            {
                string BranchId = branchId.ToString();
                SqlParameter branchIdParam = new SqlParameter("@BranchId", SqlDbType.VarChar,10);
                branchIdParam.Value = BranchId;

                SqlParameter userListParam = new SqlParameter("@userId", SqlDbType.VarChar, 800);
                userListParam.Value = userIdList;

                SqlParameter[] paramList = { branchIdParam, userListParam };

                dbEngin.DBOpen();

                return dbEngin.ExecuteDataSet("UM_Report_GerUserRoles", paramList);
            }
            catch
            {
                throw;
            }
            finally
            {
                dbEngin.DBClose();
            }
        }
Example #2
0
        public DataSet GetDailySalesReport(DateTime fromDate,DateTime toDate)
        {
            DBEgine objDbAccess = new DBEgine();
            try
            {
                objDbAccess.DBOpen();

                DataSet ds = objDbAccess.ExecuteDataSet("SELECT * FROM Sales.DailySales('"+fromDate.ToShortDateString()+"','"+toDate.ToShortDateString()+"')");

                return ds;
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                objDbAccess.DBClose();
            }
        }
Example #3
0
        public DataSet GetSalesRefundReport(DateTime fromDate, DateTime toDate, int subItemID,decimal amountFrom,decimal amountTo)
        {
            DBEgine objDbAccess = new DBEgine();
            try
            {
                SqlParameter[] parms = new SqlParameter[5];

                SqlParameter parmFromDate = new SqlParameter();
                parmFromDate.Value = fromDate;
                parmFromDate.SqlDbType = SqlDbType.Date;
                parmFromDate.Direction = ParameterDirection.Input;
                parmFromDate.ParameterName = "@SalesDateFrom";
                parms[0] = parmFromDate;

                SqlParameter parmSalesDateTo = new SqlParameter();
                parmSalesDateTo.Value = toDate;
                parmSalesDateTo.SqlDbType = SqlDbType.Date;
                parmSalesDateTo.Direction = ParameterDirection.Input;
                parmSalesDateTo.ParameterName = "@SalesDateTo";
                parms[1] = parmSalesDateTo;

                SqlParameter parmPLUID = new SqlParameter();
                parmPLUID.Value = subItemID;
                parmPLUID.SqlDbType = SqlDbType.Int;
                parmPLUID.Direction = ParameterDirection.Input;
                parmPLUID.ParameterName = "@PLUID";
                parms[2] = parmPLUID;

                SqlParameter parmAmountFrom = new SqlParameter();
                parmAmountFrom.Value = amountFrom;
                parmAmountFrom.SqlDbType = SqlDbType.Decimal;
                parmAmountFrom.Direction = ParameterDirection.Input;
                parmAmountFrom.ParameterName = "@AmountFrom";
                parms[3] = parmAmountFrom;

                SqlParameter parmAmountTo = new SqlParameter();
                parmAmountTo.Value = amountTo;
                parmAmountTo.SqlDbType = SqlDbType.Decimal;
                parmAmountTo.Direction = ParameterDirection.Input;
                parmAmountTo.ParameterName = "@AmountTo";
                parms[4] = parmAmountTo;

                objDbAccess.DBOpen();

                DataSet ds = objDbAccess.ExecuteDataSet("Sales.RefundedSalesReport",parms);

                return ds;
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                objDbAccess.DBClose();
            }
        }
Example #4
0
        public DataSet GetAllItemsReport()
        {
            DBEgine objDbAccess = new DBEgine();
            var list = new List<ItemLookUp>();
            try
            {
                objDbAccess.DBOpen();

                DataSet ds = objDbAccess.ExecuteDataSet("Inventory.GetAllItems", null);

                return ds;
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                objDbAccess.DBClose();
            }
        }
        public DataSet Report_GetScreenFunctions(int branchId, string roles)
        {
            DBEgine dbEngin = new DBEgine();
            try
            {
                SqlParameter roleIdParam = new SqlParameter("@RoleId", SqlDbType.VarChar, 200);
                roleIdParam.Value = roles;

                SqlParameter branchIdParam = new SqlParameter("@BranchId", SqlDbType.VarChar, 10);
                branchIdParam.Value = branchId.ToString();

                SqlParameter[] paramList = { roleIdParam, branchIdParam };

                dbEngin.DBOpen();

                return dbEngin.ExecuteDataSet("UR_Report_ViewScreenFunction", paramList);
            }
            catch
            {
                throw;
            }
            finally
            {
                dbEngin.DBClose();
            }
        }