예제 #1
0
        //update Setting Active
        public int UpdateSettingActive()
        {
            string sql = "UPDATE [tb_Currency] SET [Active] = 0 WHERE [Active] = 1";

            return(ConnectionDB.ExecuteNonQuery(sql));
        }
예제 #2
0
 //get Order
 public DataTable GetOrder(string con)
 {
     return(ConnectionDB.GetData(" SELECT * FROM [tb_Order] " + con));
 }
예제 #3
0
 //GetOrderPrint
 public DataTable GetOrderPrint(string sql)
 {
     return(ConnectionDB.GetData(sql));
 }
예제 #4
0
        //DeleteInputHistory
        public int DeleteInputHistory(EC_tb_InputHistory ec_tb_inputhistory)
        {
            string sql = "DELETE FROM  [tb_InputHistory] WHERE [InputID] = " + ec_tb_inputhistory.InputID;

            return(ConnectionDB.ExecuteNonQuery(sql));
        }
예제 #5
0
        //delete OrderDetail
        public int DeleteOrderDetail(EC_tb_OrderDetail ec_tb_od)
        {
            string sql = "DELETE FROM [tb_OrderDetail] WHERE [OrderID]=" + ec_tb_od.OrderID + " AND [ProductID] = " + ec_tb_od.ProductID;

            return(ConnectionDB.ExecuteNonQuery(sql));
        }
예제 #6
0
        //get Setting
        public DataTable GetSetting(string con)
        {
            string sql = "SELECT * FROM [tb_Currency] " + con;

            return(ConnectionDB.GetData(sql));
        }
예제 #7
0
        //delete all Payment
        public int DeleteAllPayment()
        {
            string sql = "DELETE FROM [tb_Payment]";

            return(ConnectionDB.ExecuteNonQuery(sql));
        }
예제 #8
0
        //delete product
        public int DeleteProduct(EC_tb_Product ec_tb_pro)
        {
            string sql = "DELETE FROM [tb_Product] WHERE ProductID=" + ec_tb_pro.ProductID;

            return(ConnectionDB.ExecuteNonQuery(sql));
        }
예제 #9
0
        //delete product from CategoryID
        public int DeleteProductFromCategoryID(EC_tb_Product ec_tb_pro)
        {
            string sql = "DELETE FROM [tb_Product] WHERE [CategoryID]=" + ec_tb_pro.CategoryID;

            return(ConnectionDB.ExecuteNonQuery(sql));
        }
예제 #10
0
 //delete all Category
 public int DeleteAllCategory()
 {
     return(ConnectionDB.ExecuteNonQuery("delete from tb_Category"));
 }
예제 #11
0
        //update InventoryCount
        public int UpdateInventoryCount(EC_tb_Product ec_tb_product)
        {
            string sql = "Update [tb_Product] set [InventoryCount] = [InventoryCount] - " + ec_tb_product.InventoryCount + " where [ProductID] = " + ec_tb_product.ProductID;

            return(ConnectionDB.ExecuteNonQuery(sql));
        }
예제 #12
0
 //delete Category
 public int DeleteCategory(EC_tb_Category ec_tb_cat)
 {
     return(ConnectionDB.ExecuteNonQuery("delete from tb_Category where [CategoryID]=" + ec_tb_cat.CategoryID));
 }
예제 #13
0
        //GetQuatityOrderDetail
        public DataTable GetQuatityOrderDetail(string condition)
        {
            string sql = "select [tb_OrderDetail].[ProductID], sum([tb_OrderDetail].[Qty]) as Qty from [tb_OrderDetail] JOIN [tb_Product] ON [tb_Product].[ProductID] = [tb_OrderDetail].[ProductID] WHERE [tb_Product].[Active] = 1 " + condition + " group by [tb_Product].[ProductID]";

            return(ConnectionDB.GetData(sql));
        }
예제 #14
0
        //delete all OrderDetail
        public int DeleteAllOrderDetail(string condition)
        {
            string sql = "DELETE FROM [tb_OrderDetail] " + condition;

            return(ConnectionDB.ExecuteNonQuery(sql));
        }
예제 #15
0
        //delete Setting
        public int DeleteSetting(EC_tb_Setting ec_tb_set)
        {
            string sql = "DELETE FROM [tb_Currency] WHERE [SettingID] =" + ec_tb_set.SettingID;

            return(ConnectionDB.ExecuteNonQuery(sql));
        }
예제 #16
0
        //delete Customer
        public int DeleteCustomer(EC_tb_Customer ec_tb_cus)
        {
            string sql = "delete from tb_Customer where CustomerID=" + ec_tb_cus.CustomerID;

            return(ConnectionDB.ExecuteNonQuery(sql));
        }
예제 #17
0
        //delete all Setting
        public int DeleteAllSetting()
        {
            string sql = "DELETE FROM [tb_Currency]";

            return(ConnectionDB.ExecuteNonQuery(sql));
        }
예제 #18
0
        //delete all Customer
        public int DeleteAllCustomer()
        {
            string sql = "delete from tb_Customer";

            return(ConnectionDB.ExecuteNonQuery(sql));
        }
예제 #19
0
        //delete Payment
        public int DeletePayment(EC_tb_Payment ec_tb_pay)
        {
            string sql = "DELETE FROM [tb_Payment] WHERE [PaymentID]=" + ec_tb_pay.PaymentID;

            return(ConnectionDB.ExecuteNonQuery(sql));
        }
예제 #20
0
        //delete Order
        public int DeleteOrder(EC_tb_Order ec_tb_ord)
        {
            string sql = "DELETE FROM [tb_Order] WHERE [OrderID]=" + ec_tb_ord.OrderID;

            return(ConnectionDB.ExecuteNonQuery(sql));
        }
예제 #21
0
        //get Payment
        public DataTable GetPayment(string con)
        {
            string sql = "select * from tb_Payment " + con;

            return(ConnectionDB.GetData(sql));
        }
예제 #22
0
        //delete all Order
        public int DeleteAllOrder()
        {
            string sql = "DELETE FROM [tb_Order]";

            return(ConnectionDB.ExecuteNonQuery(sql));
        }
예제 #23
0
        //DeleteAllInputHistory
        public int DeleteAllInputHistory()
        {
            string sql = "DELETE FROM [tb_InputHistory]";

            return(ConnectionDB.ExecuteNonQuery(sql));
        }
예제 #24
0
        //CheckExist
        public string CheckExist(string condition)
        {
            string sql = "select [ProductID] from [tb_OrderDetail] " + condition;

            return(ConnectionDB.GetOnlyRow(sql));
        }