Beispiel #1
0
        public dhItems GetdhItem(dhDBnames objDBNames, dhItems ObjItem)
        {
            dsGeneral ds           = new dsGeneral();
            DataSet   dsreturn     = objDatabase.GetDataSet(objDBNames, ObjItem, "xmlGetItems", (DataSet)ds, "dtPosItems");
            dhItems   returnObject = null;

            dsGeneral.dtPosItemsDataTable retdt = ((dsGeneral)dsreturn).dtPosItems;
            foreach (DataRow row in retdt.Rows)
            {
                returnObject = new dhItems
                {
                    IItemID              = Convert.ToInt32(row["IItemID"]),
                    FUnitePrice          = Convert.ToDouble(row["FUnitePrice"]),
                    VItemName            = Convert.ToString(row["VItemName"]),
                    FMaxDiscountPresent  = Convert.ToDouble(row["fMaxDiscountPresent"]),
                    FUnitPurchasePrice   = Convert.ToDouble(row["fUnitPurchasePrice"]),
                    IQuantity            = 1,
                    Ammount              = Convert.ToDouble(row["FUnitePrice"]) * 1,
                    IStockIn             = Convert.ToInt32(String.IsNullOrEmpty(row["IStockIn"].ToString()) ? 0 : row["IStockIn"]),
                    IStockOut            = Convert.ToInt32(String.IsNullOrEmpty(row["IStockOut"].ToString()) ? 0 : row["IStockOut"]),
                    ICurrantStock        = Convert.ToInt32(String.IsNullOrEmpty(row["ICurrantStock"].ToString()) ? 0 : row["ICurrantStock"]),
                    IsAvailable          = Convert.ToInt32(String.IsNullOrEmpty(row["ICurrantStock"].ToString()) ? 0 : row["ICurrantStock"]) > 0? true : false,
                    StockStatus          = Convert.ToInt32(String.IsNullOrEmpty(row["ICurrantStock"].ToString()) ? 0 : row["ICurrantStock"]) > 0 ? "Available" : "Not Available",
                    BIsEditAbleInInvoice = Convert.ToBoolean(row["BIsEditAbleInInvoice"].ToString()),
                };
            }
            return(returnObject);
        }
Beispiel #2
0
        public dsGeneral.dtSalaryDataTable GetSalarySheetHrEmployee(dhDBnames objDBName, dhSalary objSalary)
        {
            dsGeneral ds       = new dsGeneral();
            DataSet   dsreturn = objDatabase.GetDataSet(objDBName, objSalary, "xmlGetSalarySheetHrEmployee", (DataSet)ds, "dtSalary");

            dsGeneral.dtSalaryDataTable retdt = ((dsGeneral)dsreturn).dtSalary;
            return(retdt);
        }
Beispiel #3
0
        public dsGeneral.dtPosJournalDetailDataTable GetJournalDetail(dhDBnames objDBNames, dhJournalDetail objJournalDetail)
        {
            dsGeneral ds       = new dsGeneral();
            DataSet   dsreturn = objDatabase.GetDataSet(objDBNames, objJournalDetail, "xmlGetJournalDetail", (DataSet)ds, "dtPosJournalDetail");

            dsGeneral.dtPosJournalDetailDataTable retdt = ((dsGeneral)dsreturn).dtPosJournalDetail;
            return(retdt);
        }
Beispiel #4
0
        public dsGeneral.dtPOSCostumerDataTable GetCostumerAlert(dhDBnames objDBNames, dhCostumer objCostumer)
        {
            dsGeneral ds       = new dsGeneral();
            DataSet   dsreturn = objDatabase.GetDataSet(objDBNames, objCostumer, "xmlGetCostumerAlert", (DataSet)ds, "dtPOSCostumer");

            dsGeneral.dtPOSCostumerDataTable retdt = ((dsGeneral)dsreturn).dtPOSCostumer;
            return(retdt);
        }
Beispiel #5
0
        public dsGeneral.dtAppPreferenceDataTable GetAppPreference(dhDBnames objDBNames, dhAppPreference objPreference)
        {
            dsGeneral ds       = new dsGeneral();
            DataSet   dsreturn = objDatabase.GetDataSet(objDBNames, objPreference, "xmlGetAppPreference", (DataSet)ds, "dtAppPreference");

            dsGeneral.dtAppPreferenceDataTable retdt = ((dsGeneral)dsreturn).dtAppPreference;
            return(retdt);
        }
Beispiel #6
0
        public dsGeneral.dtPosModuleDataTable GetModule(dhDBnames objDBNames, dhModule ObjModule)
        {
            dsGeneral ds       = new dsGeneral();
            DataSet   dsreturn = objDatabase.GetDataSet(objDBNames, ObjModule, "xmlGetModule", (DataSet)ds, "dtPosModule");

            dsGeneral.dtPosModuleDataTable retdt = ((dsGeneral)dsreturn).dtPosModule;
            return(retdt);
        }
Beispiel #7
0
        /// <summary>
        /// Gets the employee.
        /// </summary>
        /// <param name="objDBName">Name of the obj DB.</param>
        /// <param name="objEmployee">The obj employee.</param>
        /// <returns></returns>
        public dsGeneral.dtEmployeeDataTable GetEmployee(dhDBnames objDBName, dhEmployee objEmployee)
        {
            dsGeneral ds       = new dsGeneral();
            DataSet   dsreturn = objDatabase.GetDataSet(objDBName, objEmployee, "xmlGetEmployee", (DataSet)ds, "dtEmployee");

            dsGeneral.dtEmployeeDataTable retdt = ((dsGeneral)dsreturn).dtEmployee;
            return(retdt);
        }
Beispiel #8
0
        public dsGeneral.dtPosPartyDataTable GetParty(dhDBnames objDBName, dhParty objParty)
        {
            dsGeneral ds       = new dsGeneral();
            DataSet   dsreturn = objDatabase.GetDataSet(objDBName, objParty, "xmlGetParty", (DataSet)ds, "dtPosParty");

            dsGeneral.dtPosPartyDataTable retdt = ((dsGeneral)dsreturn).dtPosParty;
            return(retdt);
        }
Beispiel #9
0
        /// <summary>
        /// Gets the user.
        /// </summary>
        /// <param name="objDBName">Name of the obj DB.</param>
        /// <param name="objUser">The obj user.</param>
        /// <returns></returns>
        public dsGeneral.dtAppUserDataTable GetUser(dhDBnames objDBName, dhUsers objUser)
        {
            dsGeneral ds       = new dsGeneral();
            DataSet   dsreturn = objDatabase.GetDataSet(objDBName, objUser, "xmlGetAppUser", (DataSet)ds, "dtAppUser");

            dsGeneral.dtAppUserDataTable retdt = ((dsGeneral)dsreturn).dtAppUser;
            return(retdt);
        }
Beispiel #10
0
        public dsGeneral.dtPosAccountsDataTable GetAccounts(dhDBnames objDBName, dhAccount objAccounts)
        {
            dsGeneral ds = new dsGeneral();
            DataSet   dsreturn;

            dsreturn = objDatabase.GetDataSet(objDBName, objAccounts, "xmlGetAccounts", (DataSet)ds, "dtPosAccounts");
            dsGeneral.dtPosAccountsDataTable retdt = ((dsGeneral)dsreturn).dtPosAccounts;
            return(retdt);
        }
Beispiel #11
0
        public dsGeneral.dtPosSaleManDataTable GetSaleMan(dhDBnames objDBName, dhSaleMan objSaleMan)
        {
            dsGeneral ds       = new dsGeneral();
            DataSet   dsreturn = objDatabase.GetDataSet(objDBName, objSaleMan, "xmlGetSaleMan", (DataSet)ds, "dtPosSaleMan");

            dsGeneral.dtPosSaleManDataTable retdt = ((dsGeneral)dsreturn).dtPosSaleMan;

            return(retdt);
        }
Beispiel #12
0
        //public dsGeneral.dtPosSaleManDataTable GetSaleMan(dhDBnames objDBName, dhSaleMan objSaleMan)
        //{
        //    dsGeneral ds = new dsGeneral();
        //    DataSet dsreturn = objDatabase.GetDataSet(objDBName, objSaleMan, "xmlGetSaleMan", (DataSet)ds, "dtPosSaleMan");
        //    dsGeneral.dtPosSaleManDataTable retdt = ((dsGeneral)dsreturn).dtPosSaleMan;

        //    return retdt;
        //}
        #endregion

        public dsGeneral.dtPosStockDataTable GetItemStock(dhDBnames objDBNames, dhItemStock objStock)
        {
            dsGeneral ds       = new dsGeneral();
            DataSet   dsreturn = objDatabase.GetDataSet(objDBNames, objStock, "xmlGetItemStock", (DataSet)ds, "dtPosStock");

            dsGeneral.dtPosStockDataTable retdt = ((dsGeneral)dsreturn).dtPosStock;

            return(retdt);
            //    throw new NotImplementedException();
        }
Beispiel #13
0
        public dsGeneral.dtPosItemsDataTable GetItems(dhDBnames objDBNames, dhItems ObjItem)
        {
            dsGeneral ds       = new dsGeneral();
            DataSet   dsreturn = objDatabase.GetDataSet(objDBNames, ObjItem, "xmlGetItems", (DataSet)ds, "dtPosItems");

            dsGeneral.dtPosItemsDataTable retdt = ((dsGeneral)dsreturn).dtPosItems;

            return(retdt);
            //dsGeneral.dtPosItemsDataTable dt = objDALGeneral.GetAllItems(objDBNames, ObjItem);
            //return dt;
        }
Beispiel #14
0
        private void LoadReport()
        {
            DepartmentDAL  obj           = new DepartmentDAL();
            ReportDocument crystalReport = new ReportDocument();

            crystalReport.Load(Server.MapPath("crptDepartment.rpt"));
            dsGeneral ds = obj.LoadDepartmentReport();

            crystalReport.SetDataSource(ds);
            CrystalReportViewer1.ReportSource = crystalReport;
            CrystalReportViewer1.DataBind();
        }
Beispiel #15
0
        public dsGeneral LoadDepartmentReport()
        {
            dsGeneral ds = new dsGeneral();

            try
            {
                _initObjects("SP_Department");
                cmd.Parameters.AddWithValue("@Action", "GetAllDepartment");
                da.Fill(ds, "dttblDepartment");
            }
            catch (Exception ex)
            {
                CloseCon();
                throw ex;
            }
            finally
            {
                CloseCon();
            }
            return(ds);
        }
Beispiel #16
0
        public dhAccount GetdhAccount(dhDBnames objDBNames, dhAccount objAccount)
        {
            dsGeneral ds       = new dsGeneral();
            DataSet   dsreturn = objDatabase.GetDataSet(objDBNames, objAccount, "xmlGetAccounts", (DataSet)ds, "dtPosAccounts");

            //     dhAccount returnObject = null;
            dsGeneral.dtPosAccountsDataTable retdt       = ((dsGeneral)dsreturn).dtPosAccounts;
            ObservableCollection <dhAccount> listAccount = ReflectionUtility.DataTableToObservableCollection <dhAccount>(retdt);

            if (listAccount.Count > 0)
            {
                return(listAccount.SingleOrDefault());
            }
            else
            {
                return(null);
            }
            //retdt.ToList<dhAccount>();
            //foreach (DataRow row in retdt.Rows)
            //{

            //    returnObject = new dhAccount
            //    {
            //        IItemID = Convert.ToInt32(row["IItemID"]),
            //        FUnitePrice = Convert.ToDouble(row["FUnitePrice"]),
            //        VItemName = Convert.ToString(row["VItemName"]),
            //        FMaxDiscountPresent = Convert.ToDouble(row["fMaxDiscountPresent"]),
            //        IQuantity = 1,
            //        Ammount = Convert.ToDouble(row["FUnitePrice"]) * 1,
            //        IStockIn = Convert.ToInt32(String.IsNullOrEmpty(row["IStockIn"].ToString()) ? 0 : row["IStockIn"]),
            //        IStockOut = Convert.ToInt32(String.IsNullOrEmpty(row["IStockOut"].ToString()) ? 0 : row["IStockOut"]),
            //        ICurrantStock = Convert.ToInt32(String.IsNullOrEmpty(row["ICurrantStock"].ToString()) ? 0 : row["ICurrantStock"]),
            //        IsAvailable = Convert.ToInt32(String.IsNullOrEmpty(row["ICurrantStock"].ToString()) ? 0 : row["ICurrantStock"]) > 0 ? true : false,
            //        StockStatus = Convert.ToInt32(String.IsNullOrEmpty(row["ICurrantStock"].ToString()) ? 0 : row["ICurrantStock"]) > 0 ? "Available" : "Not Available",
            //    };
            //}
            //      return returnObject;
        }