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.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 #3
0
        public static dsGeneral.dtPosItemsDataTable GetItems(dhDBnames objDBNames, dhItems objItem)
        {
            try
            {
                dsGeneral.dtPosItemsDataTable var_ret = null;

                if (objblItems == null)
                {
                    objblItems = new blItems();
                }
                {
                    var_ret = objblItems.GetItems(objDBNames, objItem);
                }

                return(var_ret);
            }
            catch (Exception ex) { throw ex; }
        }
        private void ConstructResultSet()
        {
            dhItems objitem = new dhItems();

            dsGeneral.dtPosItemsDataTable dt = iFacede.GetItems(Globalized.ObjDbName, objitem);
            _results = new List <dhItems>();
            foreach (DataRow row in dt.Rows)
            {
                _results.Add(new dhItems
                {
                    IItemID     = Convert.ToInt32(row["IItemID"]),
                    FUnitePrice = Convert.ToDouble(row["FUnitePrice"]),
                    VItemName   = Convert.ToString(row["VItemName"]),
                    //    FMaxDiscountPresent = Convert.ToDouble(row["fMaxDiscountPresent"]),
                    BIsSaleAble  = string.IsNullOrEmpty(row["bIsSaleAble"].ToString()) ? Convert.ToBoolean("False") : Convert.ToBoolean(row["bIsSaleAble"].ToString()),
                    VItemBarcode = row["vItemBarcode"].ToString()
                                   //VpartyMobile = Convert.ToString(row["VpartyMobile"]),
                                   //VPartyName = Convert.ToString(row["ReadingInches"]),
                });
            }
        }
Beispiel #5
0
 public dsGeneral.dtPosItemsDataTable GetItems(dhDBnames objDBNames, dhItems ObjItem)
 {
     dsGeneral.dtPosItemsDataTable dt = objDALGeneral.GetItems(objDBNames, ObjItem);
     return(dt);
 }