예제 #1
0
        public DataTable GetCartData(string userId, string customerId, string teratmentID)
        {
            sql_class sql = new sql_class();

            sql.Where("CustomerID", customerId);
            sql.Where("teratmentID", teratmentID);
            sql.Where("GaragID", userId);
            return(sql.Get("CartModel"));
        }
예제 #2
0
        public bool deleteItem(string GargeID, string CustomerID, string partID)
        {
            sql_class sql = new sql_class();

            sql.Where("GaragID", GargeID);
            sql.Where("CustomerID", CustomerID);
            sql.Where("ProductId", partID);
            DataTable data = sql.Delete("CartModel");

            return((data.Rows.Count > 0) ? true : false);
        }
예제 #3
0
        public static string GetozarName(string id)
        {
            sql_class sql  = new sql_class();
            DataTable data = sql.Where("tozeret_cd", id).Get("Manufacturers", "tozar");

            return(data.Rows[0]["tozar"].ToString());
        }
예제 #4
0
        public static DataTable Info(int ID)
        {
            sql_class sql  = new sql_class();
            DataTable data = sql.Where("CustomerID", ID.ToString()).Get("Vehicle");

            return(data);
        }
예제 #5
0
        //delete repair job in database
        public bool deleteJob(string teratmentID)
        {
            sql_class sql = new sql_class();

            sql.Where("teratmentID", teratmentID);
            DataTable jobDelete = sql.Delete("RepairJob");

            return((jobDelete.Rows.Count > 0) ? true : false);
        }
예제 #6
0
        // //delete teratmient All part from cart database
        public bool deleteAllCart(string teratmentID)
        {
            sql_class cart = new sql_class();

            cart.Where("teratmentID", teratmentID);
            DataTable cartDelete = cart.Delete("CartModel");

            return((cartDelete.Rows.Count > 0) ? true : false);
        }
예제 #7
0
        //End and close repiarJob
        public bool cartItemChengaStatus(string teratmentID)
        {
            sql_class sql = new sql_class();

            sql.Where("teratmentID", teratmentID);
            var Dblist = new List <DbListAdapter>();

            Dblist.Add(new DbListAdapter("order_Status", "false"));
            bool updateOrnot = sql.Update("CartModel", Dblist);

            return(updateOrnot);
        }
예제 #8
0
        //End and close repiarJob
        public bool closeRepiarJob(string teratmentID)
        {
            var       nowDataTime = DateTime.Now.ToString("yyyy-MM-dd h:mm:ss tt");
            sql_class sql         = new sql_class();

            sql.Where("teratmentID", teratmentID);
            var Dblist = new List <DbListAdapter>();

            Dblist.Add(new DbListAdapter("Status", "false"));
            Dblist.Add(new DbListAdapter("EndDate", nowDataTime));
            bool updateOrnot = sql.Update("RepairJob", Dblist);

            return(updateOrnot);
        }
예제 #9
0
        public List <RepairJobl> AllHistory(string Id)
        {
            List <RepairJobl> list = new List <RepairJobl>();
            sql_class         sql  = new sql_class();

            sql.Where("GaragID", Id);
            DataTable data = sql.Get("RepairJob");

            for (int i = 0; i < data.Rows.Count; i++)
            {
                RepairJobl Teratment = new RepairJobl(Convert.ToInt32(data.Rows[i]["teratmentID"]));
                list.Add(Teratment);
            }
            return(list);
        }
예제 #10
0
        public static DataTable GeModelName(string id, string Shnat_Yitzur, string Tozeret_cd)
        {
            //List<string> dagemInfo = new List<string>();
            sql_class sql  = new sql_class();
            DataTable data = sql.Where("degem_cd", id)
                             .Where("shnat_yitzur", Shnat_Yitzur)
                             .Where("tozeret_cd", Tozeret_cd)
                             .Get("Model");

            if (data.Rows.Count > 0)
            {
                return(data);
            }
            else
            {
                return(null);
            }
        }
예제 #11
0
        public static DataTable GetParts(string id, params string[] fields)
        {
            sql_class sql_ = new sql_class();

            if (fields.Length > 0)
            {
                foreach (string fiald in fields)
                {
                    if (!string.IsNullOrEmpty(fiald))
                    {
                        sql_.OrWhere("ProdectGroup", fiald);
                    }
                }
            }
            sql_.Where("GaragID", id);
            DataTable data = sql_.Get("PartModel");

            return(data);
        }