예제 #1
0
        public static bool CreateNewEvent(List <DbListAdapter> data)

        {
            sql_class newsql = new sql_class();

            return(newsql.Insert("EventsModel", data) ? true : false);
        }
예제 #2
0
        //Func RegistraionNew_RepairJob
        public static bool New_RepairJob(List <DbListAdapter> data)

        {
            sql_class newsql = new sql_class();

            return(newsql.Insert("RepairJob", data) ? true : false);
        }
예제 #3
0
        public RepairJobl(int id)
        {
            DataTable data = new sql_class().Where("teratmentID", id.ToString()).Get("RepairJob");

            teratmentID    = Convert.ToInt32(data.Rows[0]["teratmentID"]);
            GaragID        = Convert.ToInt32(data.Rows[0]["GaragID"]);
            CustomerID     = Convert.ToInt32(data.Rows[0]["CustomerID"]);
            TypeID         = Convert.ToInt32(data.Rows[0]["TypeID"]);
            License_Number = data.Rows[0]["License_Number"].ToString();
            description    = data.Rows[0]["description"].ToString();
            StartDate      = Convert.ToDateTime(data.Rows[0]["StartDate"]);
            Status         = Convert.ToBoolean(data.Rows[0]["Status"]);
            Approved_by    = data.Rows[0]["Approved_by"].ToString();
            Mileage_start  = data.Rows[0]["Mileage_start"].ToString();
            var isNull = data.Rows[0]["TotalWorkingHours"].ToString();

            if (isNull != "")
            {
                TotalWorkingHours = Convert.ToInt32(data.Rows[0]["TotalWorkingHours"]);
            }
            var isEnddateNull = data.Rows[0]["EndDate"].ToString();

            if (isEnddateNull != "")
            {
                EndDate = Convert.ToDateTime(data.Rows[0]["EndDate"]);
            }
        }
예제 #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
        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());
        }
예제 #6
0
        public static bool create_new_Customer(List <DbListAdapter> data)

        {
            sql_class newsql = new sql_class();

            return(newsql.Insert("Customer", data) ? true : false);
        }
예제 #7
0
        public static bool create_new_Employee(List <DbListAdapter> data)

        {
            sql_class newsql = new sql_class();

            return(newsql.Insert("EmployeModel", data) ? true : false);
        }
예제 #8
0
        public static bool create_new_Vehicle(List <DbListAdapter> data)

        {
            sql_class newsql = new sql_class();

            return(newsql.Insert("Vehicle", data) ? true : false);
        }
예제 #9
0
        public Sticky_Note(int id, int i)
        {
            DataTable data = new sql_class().Where("stickyID", id.ToString()).Get("StickyModel");

            stickyID       = Convert.ToInt32(data.Rows[0]["stickyID"]);
            gargeID        = Convert.ToInt32(data.Rows[0]["GaragID"]);
            sticky_Message = data.Rows[0]["sticky_Message"].ToString();
        }
예제 #10
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);
        }
예제 #11
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);
        }
예제 #12
0
        public void New_Stikey(string message, string Session)
        {
            sql_class sql    = new sql_class();
            var       Dblist = new List <DbListAdapter>();

            Dblist.Add(new DbListAdapter("GaragID", Session));
            Dblist.Add(new DbListAdapter("sticky_Message", message));
            sql.Insert("StickyModel", Dblist);
        }
예제 #13
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"));
        }
예제 #14
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);
        }
예제 #15
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);
        }
예제 #16
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);
        }
예제 #17
0
        public CustomerModel(string ID)
        {
            DataTable data = new sql_class().Where("UsarName", ID).Get("Customer");

            CustomerID = Convert.ToInt32(data.Rows[0]["CustomerID"]);
            GaragID    = Convert.ToInt32(data.Rows[0]["GaragID"]);
            FirstName  = data.Rows[0]["FirstNmae"].ToString();
            LastName   = data.Rows[0]["LastName"].ToString();
            Email      = data.Rows[0]["Email"].ToString();
            UsarName   = data.Rows[0]["UsarName"].ToString();
            PhonNumber = data.Rows[0]["PhonNumber"].ToString();
            Password   = data.Rows[0]["Password"].ToString();
            BirthDate  = Convert.ToDateTime(data.Rows[0]["BirthDate"]);
            JoinDate   = Convert.ToDateTime(data.Rows[0]["JOINING_DATE"]);
        }
예제 #18
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);
        }
예제 #19
0
        public EventsModel(int id, int i)
        {
            DataTable data = new sql_class().Where("GaragID", id.ToString()).Where("ShwoEvent", "true").Get("EventsModel");

            GaragID     = Convert.ToInt32(data.Rows[i]["GaragID"]);
            EventID     = Convert.ToInt32(data.Rows[i]["EventID"]);
            Title       = data.Rows[i]["Title"].ToString();
            Description = data.Rows[i]["Description"].ToString();
            start       = Convert.ToDateTime(data.Rows[i]["StartDate"]);
            if (!String.IsNullOrEmpty(data.Rows[i]["EndDate"].ToString()))
            {
                end = Convert.ToDateTime(data.Rows[i]["EndDate"]);
            }
            ThemsColor = data.Rows[i]["ThemsColor"].ToString();
            IsFullDay  = Convert.ToBoolean(data.Rows[i]["IsFullDay"]);
        }
예제 #20
0
        public bool AddItem()
        {
            var Dblist = new List <DbListAdapter>();

            Dblist.Add(new DbListAdapter("CustomerID", this.CustomerID.ToString()));
            Dblist.Add(new DbListAdapter("GaragID", GaragID.ToString()));
            Dblist.Add(new DbListAdapter("ProductId", this.ProductId));
            Dblist.Add(new DbListAdapter("Quantity", this.Quantity.ToString()));
            Dblist.Add(new DbListAdapter("ProductName", this.ProductName));
            Dblist.Add(new DbListAdapter("productPrice", this.productPrice.ToString()));
            Dblist.Add(new DbListAdapter("productImage", this.productImage));
            Dblist.Add(new DbListAdapter("teratmentID", this.teratmentID));
            sql_class sql     = new sql_class();
            bool      newItem = sql.Insert("CartModel", Dblist);

            return((newItem) ? true : false);
        }
예제 #21
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);
            }
        }
예제 #22
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);
        }
예제 #23
0
        //Add new part to partModel table
        public bool newPart()
        {
            sql_class sql    = new sql_class();
            var       Dblist = new List <DbListAdapter>();

            Dblist.Add(new DbListAdapter("ProdectGroup", this.ProdectGroup));
            Dblist.Add(new DbListAdapter("PartNmae", this.PartNmae));
            Dblist.Add(new DbListAdapter("Condition", this.Condition));
            Dblist.Add(new DbListAdapter("QuantityAaliable", this.QuantityAaliable.ToString()));
            Dblist.Add(new DbListAdapter("UnitPricey", this.UnitPricey.ToString()));
            Dblist.Add(new DbListAdapter("ImageUrl", this.ImageUrl));
            Dblist.Add(new DbListAdapter("GaragID", this.GaragID.ToString()));

            bool succses = sql.Insert("PartModel", Dblist);

            if (succses)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
예제 #24
0
        public static void InsertRestData(List <DbListAdapter> data)
        {
            sql_class sql = new sql_class();

            sql.Insert("RestUserAdmin", data);
        }
예제 #25
0
        public static DataTable All_City()
        {
            DataTable sql = new sql_class().Get("City", "CityID", "CityName");

            return(sql);
        }
예제 #26
0
        public static DataTable  Customer_info(string ID)
        {
            DataTable data = new sql_class().Where("UsarName", ID).Get("Customer");

            return(data);
        }