示例#1
0
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        JobsDTO     dto    = (JobsDTO)Session["JobsDTO"];
        ModelFacade facade = new ModelFacade();
        Jobs        job    = facade.createJob(dto);
        JobsDAO     dao    = new JobsDAO();

        dao.issueJob(job);
        Session.Abandon();
        Response.Redirect("~/Staff/AdminHome.aspx");
    }
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        Jobs job = new Jobs();

        job.jobID         = lblJobID.Text;
        job.partID        = lblPartID.Text;
        job.hoursWorked   = lblHoursWorked.Text;
        job.dateCompleted = lblDateCompleted.Text;
        JobsDAO dao = new JobsDAO();

        dao.completeJob(job);
        Session.Abandon();
        Response.Redirect("~/Technicians/TechniciansHome.aspx");
    }
示例#3
0
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        String newID         = lblID.Text;
        String newItem       = dropDownItemID.SelectedValue;
        String newTechnician = dropDownTechID.SelectedValue;

        job.jobID        = newID;
        job.itemID       = newItem;
        job.techID       = newTechnician;
        job.dateAssigned = calNewDate.SelectedDate.ToShortDateString();
        JobsDAO dao = new JobsDAO();

        dao.reIssueJob(job);
        Session.Abandon();
        Response.Redirect("~/Staff/AdminHome.aspx");
    }
示例#4
0
 public JobsBAL()
 {
     _jobsDAO = new JobsDAO();
 }
示例#5
0
        public int UpdateStatus(string id, string status)
        {
            int result = new JobsDAO().UpdateStatus(id, status);

            return(result);
        }
示例#6
0
        public Jobs SelectByCidSid(string cid, string sid)
        {
            Jobs job = new JobsDAO().SelectByCidSid(cid, sid);

            return(job);
        }
示例#7
0
        public List <Jobs> SelectByCid(string cid)
        {
            List <Jobs> jobs = new JobsDAO().SelectByCid(cid);

            return(jobs);
        }
示例#8
0
        public List <Jobs> SelectByUid(string uid)
        {
            List <Jobs> jobs = new JobsDAO().SelectByUid(uid);

            return(jobs);
        }
示例#9
0
        public Jobs SelectById(string id)
        {
            Jobs job = new JobsDAO().SelectById(id);

            return(job);
        }
示例#10
0
        public int AddJob()
        {
            int result = new JobsDAO().Insert(this);

            return(result);
        }