internal void InsertSalesDetails(SalesDetails instance, string invstatus)
        {
            base.com.CommandText = "spInsertSalesDetailsByItem";
            base.com.Parameters.AddWithValue("_InvNo", instance.InvNo);
            base.com.Parameters.AddWithValue("_ProdID", instance.ProdID);
            base.com.Parameters.AddWithValue("_Qty", instance.Qty);
            base.com.Parameters.AddWithValue("_UnitPx", instance.UnitPx);
            base.com.Parameters.AddWithValue("_Prodname", instance.ProdName_);
            base.com.Parameters.AddWithValue("_IMEI", instance.IMEI_);
            base.com.Parameters.AddWithValue("_Discount", instance.Discount);
            base.com.Parameters.AddWithValue("_InvStatus", invstatus);

            try
            {
                int res = Convert.ToInt32(base.com.ExecuteScalar());
            }
            catch (Exception e)
            {
                throw new Exception(e.Message);
            }
            finally
            {
                closeConnection();
            }
        }
        public static List<SalesDetails> GetSalesDetailsByInvno(string invno)
        {
            var dal = new SalesDetailsDAL();
            var collection = new List<SalesDetails>();

            foreach(DataRow row in dal.GetSalesDetailsByInvno(invno).Rows){
                var instance = new SalesDetails();
                instance.Bind(row);

                collection.Add(instance);
            }

            return collection;
        }
예제 #3
0
        public static List <SalesDetails> GetSalesDetailsByInvno(string invno)
        {
            var dal        = new SalesDetailsDAL();
            var collection = new List <SalesDetails>();

            foreach (DataRow row in dal.GetSalesDetailsByInvno(invno).Rows)
            {
                var instance = new SalesDetails();
                instance.Bind(row);

                collection.Add(instance);
            }

            return(collection);
        }
예제 #4
0
        public static void InsertSalesDetails(SalesDetails instance, string invstatus)
        {
            var dal = new SalesDetailsDAL();

            dal.InsertSalesDetails(instance, invstatus);
        }
        public static void InsertSalesDetails(SalesDetails instance, string invstatus)
        {
            var dal = new SalesDetailsDAL();

            dal.InsertSalesDetails(instance, invstatus);
        }