Exemplo n.º 1
0
        // submit new work card for customer

        protected void Submit_RepairJob_Click(object sender, EventArgs e)
        {
            if (Page.IsValid)
            {
                try
                {
                    var Dblist = new List <DbListAdapter>();
                    Dblist.Add(new DbListAdapter("GaragID", Session["UserID"].ToString()));
                    Dblist.Add(new DbListAdapter("CustomerID", CustomID.Value));
                    Dblist.Add(new DbListAdapter("TypeID", SelectTipol.Value));
                    Dblist.Add(new DbListAdapter("License_Number", License_id.Text));
                    Dblist.Add(new DbListAdapter("description", description_ID.Value));
                    Dblist.Add(new DbListAdapter("StartDate", Data_ID.Value));
                    Dblist.Add(new DbListAdapter("Approved_by", UserName_ID.Value));
                    Dblist.Add(new DbListAdapter("Mileage_start", Mileage_start.Value));

                    bool Repair = RepairJobl.New_RepairJob(Dblist);
                    if (Repair)
                    {
                        annualTreatment();
                        Error_ID.Text = "כרטיס עבודה חדש נפתח בהצלחה ! ";
                        showmodel();
                    }
                }
                catch (Exception ex)
                {
                    throw ex;
                }
            }
            else
            {
                Error_ID.Text = "חובה למלא שדות חובה ! ";
            }
        }