internal void InsertSalesInfo(SalesInfo instance)
        {
            base.com.CommandText = "spInsertSalesInfoByCustomer";
            base.com.Parameters.AddWithValue("_InvNo", instance.InvNo);
            base.com.Parameters.AddWithValue("_CustName", instance.CustName);
            base.com.Parameters.AddWithValue("_Address", instance.Address);
            base.com.Parameters.AddWithValue("_EmailAdd", instance.EmailAdd);
            base.com.Parameters.AddWithValue("_ContactNumber", instance.ContactNo);
            base.com.Parameters.AddWithValue("_CustNo", instance.CustNo);
            base.com.Parameters.AddWithValue("_TotalAmount", instance.TotalAmount);
            base.com.Parameters.AddWithValue("_EmpID", instance.EmpID);
            base.com.Parameters.AddWithValue("_Status", instance.Status);
            base.com.Parameters.AddWithValue("_Remarks", instance.Remarks);
            base.com.Parameters.AddWithValue("_KioskID", instance.KioskID);
            base.com.Parameters.AddWithValue("_TakenBy", instance._TakenBy);

            try{
                int res = Convert.ToInt32(base.com.ExecuteScalar());
            }
            catch (Exception e)
            {
               throw new Exception(e.Message);
            }
            finally
            {
                closeConnection();
            }
        }
예제 #2
0
        public static SalesInfo SelectInvoiceNo(string invno)
        {
            var dal      = new SalesInfoDAL();
            var instance = new SalesInfo();

            foreach (DataRow row in dal.SelectInvoiceNo(invno).Rows)
            {
                instance.NewBind001(row);
            }

            return(instance);
        }
예제 #3
0
        public static List <SalesInfo> GetAllByInvDate(string invdate, int kioskid)
        {
            var dal        = new SalesInfoDAL();
            var collection = new List <SalesInfo>();

            foreach (DataRow row in dal.GetAllByInvDate(invdate, kioskid).Rows)
            {
                var instance = new SalesInfo();
                instance.Bind(row);
                collection.Add(instance);
            }

            return(collection);
        }
예제 #4
0
        public static List <SalesInfo> GetRemarkedSales(string empid, int kioskid)
        {
            var dal        = new SalesDetailsDAL();
            var collection = new List <SalesInfo>();

            foreach (DataRow row in dal.GetRemarkedSales(empid, kioskid).Rows)
            {
                var instance = new SalesInfo();
                instance.Bind(row);
                collection.Add(instance);
            }

            return(collection);
        }
예제 #5
0
        public static List <SalesInfo> GetAllSalesInfo()
        {
            var dal        = new SalesInfoDAL();
            var collection = new List <SalesInfo>();

            foreach (DataRow row in dal.GetAllSalesInfo().Rows)
            {
                var instance = new SalesInfo();
                instance.Bind(row);
                collection.Add(instance);
            }

            return(collection);
        }
예제 #6
0
        public static List <SalesInfo> GetSalesByKioskDateRange(string from, string to, int kioskid)
        {
            var dal        = new SalesInfoDAL();
            var collection = new List <SalesInfo>();

            foreach (DataRow row in dal.GetSalesByKioskDateRange(from, to, kioskid).Rows)
            {
                var ins = new SalesInfo();

                ins.Bind2(row);
                collection.Add(ins);
            }

            return(collection);
        }
 internal void UpdateSalesInfo(SalesInfo si)
 {
     base.com.CommandText = "spUpdateSalesInfo";
     base.com.Parameters.AddWithValue("_InvNo", si.InvNo);
     base.com.Parameters.AddWithValue("_CustName", si.CustName);
     base.com.Parameters.AddWithValue("_Address", si.Address);
     base.com.Parameters.AddWithValue("_EmailAdd", si.EmailAdd);
     base.com.Parameters.AddWithValue("_ContactNumber", si.ContactNo);
     base.com.Parameters.AddWithValue("_CustNo", si.CustNo);
     base.com.Parameters.AddWithValue("_TotalAmount", si.TotalAmount);
     base.com.Parameters.AddWithValue("_Status", si.Status);
     base.com.Parameters.AddWithValue("_TakenBy", si._TakenBy);
     try
     {
         int res = Convert.ToInt32(base.com.ExecuteScalar());
     }catch(Exception e){
         throw new Exception(e.Message);
     }finally{
         closeConnection();
     }
 }
예제 #8
0
        public static void UpdateSalesInfo(SalesInfo si)
        {
            var dal = new SalesInfoDAL();

            dal.UpdateSalesInfo(si);
        }
예제 #9
0
        public static void InsertSalesInfo(SalesInfo instance)
        {
            var dal = new SalesInfoDAL();

            dal.InsertSalesInfo(instance);
        }
        public static SalesInfo SelectInvoiceNo(string invno)
        {
            var dal = new SalesInfoDAL();
            var instance = new SalesInfo();

            foreach (DataRow row in dal.SelectInvoiceNo(invno).Rows)
            {
                instance.NewBind001(row);
            }

            return instance;
        }
 public static void UpdateSalesInfo(SalesInfo si)
 {
     var dal = new SalesInfoDAL();
     dal.UpdateSalesInfo(si);
 }
 public static void InsertSalesInfo(SalesInfo instance)
 {
     var dal = new SalesInfoDAL();
     dal.InsertSalesInfo(instance);
 }
        public static List<SalesInfo> GetSalesByKioskDateRange(string from, string to, int kioskid)
        {
            var dal = new SalesInfoDAL();
            var collection = new List<SalesInfo>();

            foreach (DataRow row in dal.GetSalesByKioskDateRange(from, to, kioskid).Rows)
            {
                var ins = new SalesInfo();

                ins.Bind2(row);
                collection.Add(ins);
            }

            return collection;
        }
        public static List<SalesInfo> GetRemarkedSales(string empid, int kioskid)
        {
            var dal = new SalesDetailsDAL();
            var collection = new List<SalesInfo>();

            foreach (DataRow row in dal.GetRemarkedSales(empid, kioskid).Rows)
            {
                var instance = new SalesInfo();
                instance.Bind(row);
                collection.Add(instance);
            }

            return collection;
        }
        public static List<SalesInfo> GetAllSalesInfo()
        {
            var dal = new SalesInfoDAL();
            var collection = new List<SalesInfo>();

            foreach(DataRow row in dal.GetAllSalesInfo().Rows){
                var instance = new SalesInfo();
                instance.Bind(row);
                collection.Add(instance);
            }

            return collection;
        }
        public static List<SalesInfo> GetAllByInvDate(string invdate, int kioskid)
        {
            var dal = new SalesInfoDAL();
            var collection = new List<SalesInfo>();

            foreach (DataRow row in dal.GetAllByInvDate(invdate, kioskid).Rows)
            {
                var instance = new SalesInfo();
                instance.Bind(row);
                collection.Add(instance);
            }

            return collection;
        }