예제 #1
0
    protected void confirm_Click(object sender, EventArgs e)
    {
        CarUse ci = new CarUse();

        ci.StaffName      = staffName.Text;
        ci.DepartmentName = department.Text;
        ci.AlongCount     = Convert.ToInt32(alongCount.Value);
        ci.StartDate      = Convert.ToDateTime(startDate.Value);
        ci.EndDate        = Convert.ToDateTime(endDate.Value);
        ci.AlongName      = alongName.Text;
        ci.Destination    = destination.Value;
        ci.Driver         = driver.Value;
        ci.CarNum         = carNum.Value;
        ci.Reason         = reason.Text;
        ci.Note           = note.Text;
        ci.ApproveProcess = "";

        int recordid = CarUse.SetCarUseByID(-1, ci);
        List <CarUseRecord> recordList = getRecordList();

        CarUseRecord.SetCarUseRecord(recordList, recordid);



        Response.Redirect("~/Account/ApplyListPage.aspx");
    }
예제 #2
0
    private void updateApprove(string if_agree, string next, BasicInfo info, bool if_back)
    {
        Users  usr      = (Users)Session["Identify"];
        int    recordID = Convert.ToInt32(Request["RecordID"]);
        CarUse ci       = CarUse.GetCarUseByID(recordID);

        ci.ApproveProcess += info.StaffName.Trim() + "-" + if_agree + ",";
        CarUse.SetCarUseByID(recordID, ci);

        string nextApprover = next;
        int    applyID      = Convert.ToInt32(Request["ApplyID"]);

        Apply.UpdateNextApprover(applyID, nextApprover, if_back);
    }