コード例 #1
0
    protected void AddServiceButton_Click(object sender, EventArgs e)
    {
        try
        {
            Job item = new Job();

            item.CustomerID            = int.Parse(CustomerDDL.SelectedValue);
            item.JobDateIn             = DateTime.Now;
            item.JobDateStarted        = DateTime.Now;
            item.EmployeeID            = int.Parse("3");
            item.ShopRate              = int.Parse("55");
            item.StatusCode            = "I";
            item.VehicleIdentification = "vinaladlfmsdfm1234";



            JobController sysmgr = new JobController();
            int           newjob = sysmgr.Job_Add(item);


            JobServiceGridView.DataBind();
        }
        catch (Exception ex)
        {
        }
    }
コード例 #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        var newjob = Request.QueryString["job"];

        if (!Request.IsAuthenticated)
        {
            Response.Redirect("~/Account/Login.aspx");
        }
        else if (newjob == "0")
        {
            UserFullName.Text = User.Identity.Name.ToString();
        }
        else
        {
            CustomerDDL.Visible = false;

            UserFullName.Text  = User.Identity.Name.ToString();
            JobID.Text         = Request.QueryString["id"];
            CustomerName.Text  = Request.QueryString["name"];
            ContactNumber.Text = Request.QueryString["contact"];

            JobController sysmgr = new JobController();
            int           jobId  = int.Parse(JobID.Text);

            JobServiceGridView.DataSource = sysmgr.CurrentJobDetail(jobId);
            JobServiceGridView.DataBind();
        }
    }