Exemplo n.º 1
0
 public DataSet Select(OrdedetailsBOL obj)
 {
     try
     {
         DataSet ds = objBll.Select(obj);
         return(ds);
     }
     catch
     {
     }
     return(null);
 }
Exemplo n.º 2
0
 public bool Delete(OrdedetailsBOL obj)
 {
     if (obj != null)
     {
         try
         {
             int retVal = objBll.Delete(obj);
             if (retVal > 0)
             {
                 return(true);
             }
         }
         catch
         {
             return(false);
         }
     }
     return(false);
 }
Exemplo n.º 3
0
        public List <OrdedetailsBOL> LoadOrdedetailsData(OrdedetailsBOL obj)
        {
            DataSet               dsOrdedetails  = objBll.Select(obj);
            OrdedetailsBOL        objSO          = new OrdedetailsBOL();
            List <OrdedetailsBOL> lstOrdedetails = new List <OrdedetailsBOL>();

            if (dsOrdedetails != null && dsOrdedetails.Tables[0] != null && dsOrdedetails.Tables[0].Rows.Count > 0)
            {
                foreach (DataRow dr in dsOrdedetails.Tables[0].Rows)
                {
                    objSO = new OrdedetailsBOL();
                    objSO.OrderDetailID = Convert.ToInt32(dr["OrderDetailID"]);
                    objSO.OrderID       = Convert.ToInt32(dr["OrderID"]);
                    objSO.ProductID     = Convert.ToInt32(dr["ProductID"]);
                    objSO.UnitPrice     = Convert.ToDecimal(dr["UnitPrice"]);
                    objSO.Quantity      = Convert.ToInt32(dr["Quantity"]);
                    objSO.Discount      = Convert.ToDouble(dr["Discount"]);
                    objSO.OrderType     = Convert.ToInt32(dr["OrderType"]);
                    lstOrdedetails.Add(objSO);
                }
            }
            return(lstOrdedetails);
        }