/// <summary> /// 결재 상태 state process (0 : 결재 신청 대기중 , 1 : 결재중 , 2 : 결재 완료) /// </summary> /// <param name="visitDataInfo"></param> /// <returns></returns> public String getApproveStringKOR(TakeOutDataInfo takeOutDataInfo) { String approveString = ""; if (takeOutDataInfo.ApprovalState == 0) { approveString = "Lưu tạm thời (임시저장)"; } else if (takeOutDataInfo.ApprovalState == 1) { approveString = "Gửi phê duyệt (결재상신)"; } else if (takeOutDataInfo.ApprovalState == 2) { approveString = getComsState(takeOutDataInfo); } else if (takeOutDataInfo.ApprovalState == 3) { approveString = "Trả lại (반려)"; } else if (takeOutDataInfo.ApprovalState == 4) { } return(approveString); }
/// <summary> /// /// </summary> /// <param name="visitDataInfo"></param> /// <returns></returns> private String getComsState(TakeOutDataInfo obj) { String state = ""; if (obj.ApprovalState == 2) { if (obj.TakeOutItemDataList[0].TakeINTime.Equals("-") && obj.TakeOutItemDataList[0].TakeOutTime.Equals("-")) { state = "Hoàn thành phê duyệt (결재완료)"; } else { state = "Mang vào (반입)"; if (obj.TakeOutItemDataList[0].TakeINTime.Equals("-")) { state = "Mang ra (반출)"; } if (obj.TakeOutItemDataList[0].TakeOutTime.Equals("-")) { state = "Đồng ý (승인)"; } } } return(state); }
protected void GridViewExcel_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { TakeOutDataInfo takeOutDataInfo = (TakeOutDataInfo)e.Row.DataItem; e.Row.Cells[1].Text = bll.timeKor(takeOutDataInfo.TakeOutItemDataList[0].TakeOutTime); //반출일 ngày mang vào e.Row.Cells[2].Text = takeOutDataInfo.RequestUserDisplayName; //신청자 người đăng ký e.Row.Cells[6].Text = takeOutDataInfo.TakeOutItemDataList[0].ParentCodeName; //대분류 tài sản lớn e.Row.Cells[7].Text = takeOutDataInfo.TakeOutItemDataList[0].SubCodeName; // 중분류 tài sản vừa e.Row.Cells[8].Text = takeOutDataInfo.TakeOutItemDataList[0].TakeOutItemName; //반출항목 hạng mục mang ra e.Row.Cells[9].Text = takeOutDataInfo.TakeOutItemDataList[0].TakeOutItemType; //규격 quy cách e.Row.Cells[10].Text = takeOutDataInfo.TakeOutItemDataList[0].Account.ToString(); //수량 số lượng e.Row.Cells[11].Text = takeOutDataInfo.TakeOutItemDataList[0].UnitName; //단위 đơn vị e.Row.Cells[16].Text = bll.requireKor(takeOutDataInfo.RequireIN); //반입여부 có mang vào hay không e.Row.Cells[21].Text = takeOutDataInfo.TakeOutItemDataList[0].OutSecurityUserName; //반출처리자 người xử lý mang ra //반입일 표시 hiển thị ngày mang vào if (takeOutDataInfo.RequireIN == 2) { e.Row.Cells[27].Text = "Không thể mang vào (반입불가)"; } else { e.Row.Cells[27].Text = bll.timeKor(takeOutDataInfo.TakeOutItemDataList[0].TakeINTime); //반입일 ngày mang vào } e.Row.Cells[28].Text = bll.getApproveStringKOR(takeOutDataInfo); //상태 tình trạng e.Row.Cells[29].Text = takeOutDataInfo.TakeOutItemDataList[0].INSecurityUserName; //반입처리자 người xử lý mang vào } }
protected void GridView1_RowDataBound1(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { TakeOutDataInfo obj = (TakeOutDataInfo)e.Row.DataItem; e.Row.Cells[1].Text = bll.timeKor(obj.TakeOutItemDataList[0].TakeOutTime); //반출일 ngày mang ra e.Row.Cells[2].Text = obj.RequestUserDisplayName; //신청자 người đăng ký e.Row.Cells[3].Text = StringUtil.GetShortString(obj.CompanyName, 50, "..."); //반출처 địa điểm e.Row.Cells[4].Text = StringUtil.GetShortString(obj.RecieveName, 50, ""); //수령자 người nhận e.Row.Cells[5].Text = bll.requireKor(obj.RequireIN); //반입여부 có/không vào cổng e.Row.Cells[6].Text = StringUtil.GetShortString(obj.TakeOutItemDataList[0].TakeOutItemName, 18, "..."); //반출항목 hamgj mục ra //반입일 표시 hiển thị ngày vào if (obj.RequireIN == 2) { e.Row.Cells[9].Text = "Không đồng ý (반입불가)"; } else { e.Row.Cells[9].Text = bll.timeKor(obj.TakeOutItemDataList[0].TakeINTime); //반입일 Ngày vào } e.Row.Cells[10].Text = bll.getApproveStringKOR(obj); for (int i = 0; i < e.Row.Cells.Count; i++) { if (i < 10) { e.Row.Cells[i].Attributes.Add("onclick", "window.location='viewTakeOut.aspx?takeOutDataCode=" + obj.TakeOutDataCode + "';"); e.Row.Cells[i].Attributes.Add("style", "cursor:hand;"); } } //반입예정일이 지난 것들 색상 표시 hiển thị màu sắc quá hạn ngày dự định vào if (obj.RequireIN == 1 && obj.TakeOutItemDataList[0].TakeINTime == "-" && obj.TakeOutItemDataList[0].TakeOutTime != "-") { if (Convert.ToDateTime(obj.ScheduleInDate) < DateTime.Now.Date) { e.Row.Attributes.Add("style", "background-color:#FFF7A2;"); e.Row.Attributes.Add("onmouseover", "this.style.backgroundColor='#C0C0C0'"); e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor='#FFF7A2'"); } else { e.Row.Attributes.Add("onmouseover", "this.style.backgroundColor='#C0C0C0'"); e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor='#FFFFFF'"); } } else { e.Row.Attributes.Add("onmouseover", "this.style.backgroundColor='#C0C0C0'"); e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor='#FFFFFF'"); } } }
public string stNote; //비고 Ghi chú protected void Page_Load(object sender, EventArgs e) { // 로그인 체크 check login EmployeeInfo loginEmployee = new EmployeeInfo(); loginEmployee = (EmployeeInfo)Session["loginMember"]; if (loginEmployee == null) { Response.Redirect("~/login.aspx", true); } TakeOutDataInfo takeOutDataInfo = bll.selectTakeOutData(Request.QueryString["takeOutDataCode"]); // 신청자 보이기 xem người đăng ký lblDepartment.Text = takeOutDataInfo.RequestUserDepartment; lblUpnid.Text = takeOutDataInfo.RequestUserCode; lblOfficeName.Text = takeOutDataInfo.RequestUserOfficeName; lblDisplayName.Text = takeOutDataInfo.RequestUserDisplayName; lblTitle.Text = takeOutDataInfo.RequestUserTitleName; lblPhone.Text = loginEmployee.MobilePhoneNumber; // 반출 정보 보이기 xem thông tin tài sản ra/vào lblTakeOutDataCode.Text = takeOutDataInfo.TakeOutDataCode; //lblScheduleDate.Text = takeOutDataInfo.ScheduleInDate; // 반입예정일,반입필->반입불가,비고 수정 가능하게 ngày dự định mang vào, cần mang vào -> cấm mang vào, ghi chú: có thể sửa // 2009-09-23 임종우 scheduleDateTitle = takeOutDataInfo.ScheduleInDate; lblTakeOutObject.Text = takeOutDataInfo.TakeOutObjectName; lblTakeOutObjectContents.Text = takeOutDataInfo.ObjectContents; lblTakeOutPathStart.Text = takeOutDataInfo.TakeOutPathStartName; lblTakeOutPathEnd.Text = takeOutDataInfo.TakeOutPathEndName; lblCompanyName.Text = takeOutDataInfo.CompanyName; lblReceiveName.Text = takeOutDataInfo.RecieveName; //lblRequireIN.Text = bll.requireKor(takeOutDataInfo.RequireIN); if (takeOutDataInfo.RequireIN == 1) { ckRequire1 = "checked"; } else { ckRequire2 = "checked"; } lblDisApproveName.Text = takeOutDataInfo.DisApprovalCategoryName; lblDisApproveDetail.Text = takeOutDataInfo.DisApprovalCategoryDetail; lblCarNumber.Text = takeOutDataInfo.CarNumber; //lblNote.Text = takeOutDataInfo.Note; stNote = takeOutDataInfo.Note; lblINUserName.Text = takeOutDataInfo.TakeOutItemDataList[0].INSecurityUserName; lblOutUserName.Text = takeOutDataInfo.TakeOutItemDataList[0].OutSecurityUserName; lblINTime.Text = takeOutDataInfo.TakeOutItemDataList[0].TakeINTime.ToString(); lblOutTime.Text = takeOutDataInfo.TakeOutItemDataList[0].TakeOutTime.ToString(); }
protected void Page_Load(object sender, EventArgs e) { TakeOutData blltakeOutData = new TakeOutData(); TakeOutItemData bllTakeOutItemData = new TakeOutItemData(); List <TakeOutItemDataInfo> list = bllTakeOutItemData.selectTakeOutItemDataList(Request.QueryString["takeOutDataCode"]); for (int i = 0; i < list.Count; i++) { TakeOutItemDataInfo item = (TakeOutItemDataInfo)list[i]; int resultDel = bllTakeOutItemData.deleteTakeOutItemData(item); } TakeOutDataInfo takeOutDataInfo = new TakeOutDataInfo(); takeOutDataInfo.TakeOutDataCode = Request.QueryString["takeOutDataCode"]; int result = blltakeOutData.deleteTakeOutData(takeOutDataInfo); Page.RegisterClientScriptBlock("alert", JavaScriptBuilder.alert("đã xóa (삭제 하였습니다).", "listTakeOut.aspx")); }
protected void GridView1_RowDataBound1(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { TakeOutDataInfo obj = (TakeOutDataInfo)e.Row.DataItem; e.Row.Cells[1].Text = bll.timeKor(obj.TakeOutItemDataList[0].TakeOutTime); //반출일 ngày mang ra e.Row.Cells[2].Text = StringUtil.GetShortString(obj.CompanyName, 50, "..."); //반출처 nơi nhận e.Row.Cells[3].Text = StringUtil.GetShortString(obj.RecieveName, 50, "..."); //수령자 người nhận e.Row.Cells[4].Text = bll.requireKor(obj.RequireIN); //반입여부 e.Row.Cells[5].Text = StringUtil.GetShortString(obj.TakeOutItemDataList[0].TakeOutItemName, 18, "..."); //반출항목 hạng mục mang ra //반입일 표시 hiển thị ngày vào if (obj.RequireIN == 2) { e.Row.Cells[8].Text = "Không thể mang vào (반입불가))"; // Không đồng ý ra } else { e.Row.Cells[8].Text = bll.timeKor(obj.TakeOutItemDataList[0].TakeINTime); //반입일 } //반려 일 경우 삭제 xóa ngày trả lại if (obj.ApprovalState == 3) { e.Row.Cells[11].Text = "<a href='#;' onclick=\"javascript:confirmDelete('deleteTakeOut.aspx?takeOutDataCode=" + obj.TakeOutDataCode + "');\">"; e.Row.Cells[11].Text += "<img src='/COMS/images/icon/delete.gif'></a>"; } // 임시저장일 경우 수정과 삭제 보이기 sửa và xóa ngày lưu tạm thời if (obj.ApprovalState == 0) { e.Row.Cells[10].Text = "<a href='inputTakeOut.aspx?takeOutDataCode=" + obj.TakeOutDataCode + "&mode=modify'>"; e.Row.Cells[10].Text += "<img src='/COMS/images/icon/edit.gif'></a>"; e.Row.Cells[11].Text = "<a href='#;' onclick=\"javascript:confirmDelete('deleteTakeOut.aspx?takeOutDataCode=" + obj.TakeOutDataCode + "');\">"; e.Row.Cells[11].Text += "<img src='/COMS/images/icon/delete.gif'></a>"; // e.Row.Cells[1].Text = bll.timeKor(obj.TakeINTime); //HyperLink colModify = (HyperLink)e.Row.Cells[11].Controls[0]; //colModify.NavigateUrl = "inputTakeOut.aspx?takeOutDataCode=" + obj.TakeOutDataCode + "&mode=modify"; //colModify.ImageUrl = "~/images/icon/edit.gif"; //HyperLink colDelete = (HyperLink)e.Row.Cells[12].Controls[0]; //colDelete.NavigateUrl = "#"; //colDelete.Attributes.Add("onclick", "javascript:confirmDelete('deleteTakeOut.aspx?takeOutDataCode=" + obj.TakeOutDataCode + "');"); //colDelete.ImageUrl = "~/images/icon/delete.gif"; } // e.Row.Cells[1].Text = bll.timeKor(obj.TakeOutTime); e.Row.Cells[9].Text = bll.getApproveStringKOR(obj); for (int i = 0; i < e.Row.Cells.Count; i++) { if (i < 11) { e.Row.Cells[i].Attributes.Add("onclick", "window.location='viewTakeOut.aspx?takeOutDataCode=" + obj.TakeOutDataCode + "';"); e.Row.Cells[i].Attributes.Add("style", "cursor:hand;"); } } //반입예정일이 지난 것들 색상 표시biểu thì màu sắc cho quá hạn ngày dự định vào if (obj.RequireIN == 1 && obj.TakeOutItemDataList[0].TakeINTime == "-" && obj.TakeOutItemDataList[0].TakeOutTime != "-") { if (Convert.ToDateTime(obj.ScheduleInDate) < DateTime.Now.Date) { e.Row.Attributes.Add("style", "background-color:#FFF7A2;"); e.Row.Attributes.Add("onmouseover", "this.style.backgroundColor='#C0C0C0'"); e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor='#FFF7A2'"); } else { e.Row.Attributes.Add("onmouseover", "this.style.backgroundColor='#C0C0C0'"); e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor='#FFFFFF'"); } } else { e.Row.Attributes.Add("onmouseover", "this.style.backgroundColor='#C0C0C0'"); e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor='#FFFFFF'"); } //e.Row.Attributes.Add("onmouseover", "this.style.backgroundColor='#C0C0C0'"); //e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor='#FFFFFF'"); } }
protected void Page_Load(object sender, EventArgs e) { // 로그인 체크 check login //EmployeeInfo loginEmployee = new EmployeeInfo(); //loginEmployee = (EmployeeInfo)Session["loginMember"]; //if (loginEmployee == null) //{ // Response.Redirect("~/login.aspx", true); //} if (this.Context.User.Identity.Name == null) { Response.Redirect("~/login.aspx", true); } EmployeeInfo requestEmployee = new EmployeeInfo(); List <ElecStatusInfo> elecApproveInfo = new List <ElecStatusInfo>(); List <TakeOutItemDataInfo> takeOutItem = new List <TakeOutItemDataInfo>(); Employee bllEmployee = new Employee(); ElecApprove bllElecApprove = new ElecApprove(); TakeOutItemData bllTakeOutItem = new TakeOutItemData(); //반출정보 thông tin tài sản ra cổng TakeOutDataInfo takeOutDataInfo = bll.selectTakeOutData(Request.QueryString["takeOutDataCode"]); // 전자결재 elecApproveInfo = bllElecApprove.SelectStatus(takeOutDataInfo.ElecApproveCode); //반출 항목 hạng mục tài sản ra cổng takeOutItem = bllTakeOutItem.selectTakeOutItemDataList(takeOutDataInfo.TakeOutDataCode); //요청자 người yêu cầu requestEmployee = bllEmployee.selectEmployee(takeOutDataInfo.RequestUserCode); requestEmployeeDepartmentName = requestEmployee.Dep_name; requestEmployeeDisplayName = requestEmployee.DisplayName; requestEmployeeUpnid = requestEmployee.Upnid; requestEmployeeTitle = requestEmployee.Title_name; // 신청자 보이기 lblDepartment.Text = takeOutDataInfo.RequestUserDepartment; lblUpnid.Text = takeOutDataInfo.RequestUserCode; lblDisplayName.Text = takeOutDataInfo.RequestUserDisplayName; lblTitle.Text = takeOutDataInfo.RequestUserTitleName; if (String.IsNullOrEmpty(requestEmployee.OfficePhoneNumber)) { lblPhone.Text = "-"; } else { lblPhone.Text = requestEmployee.OfficePhoneNumber; } // 반출 정보 보이기 thông tin tài sản ra cổng lblTakeOutDataCode.Text = takeOutDataInfo.TakeOutDataCode; lblScheduleOutDate.Text = takeOutDataInfo.ScheduleOutDate; lblTakeOutObject.Text = takeOutDataInfo.TakeOutObjectName; lblCompanyName.Text = takeOutDataInfo.CompanyName; lblReceiveName.Text = takeOutDataInfo.RecieveName; lblRequireIN.Text = bll.requireKor(takeOutDataInfo.RequireIN); if (String.IsNullOrEmpty(takeOutDataInfo.ScheduleInDate)) { lblScheduleDate.Text = "-"; } else { lblScheduleDate.Text = takeOutDataInfo.ScheduleInDate; } if (String.IsNullOrEmpty(takeOutDataInfo.ObjectContents)) { lblTakeOutObjectContents.Text = "-"; } else { lblTakeOutObjectContents.Text = takeOutDataInfo.ObjectContents; } if (String.IsNullOrEmpty(takeOutDataInfo.DisApprovalCategoryName)) { lblDisApproveName.Text = "-"; } else { lblDisApproveName.Text = takeOutDataInfo.DisApprovalCategoryName; } if (String.IsNullOrEmpty(takeOutDataInfo.Note)) { lblNote.Text = "-"; } else { lblNote.Text = takeOutDataInfo.Note; } // 결재정보 보이기 thông tin phê duyệt int count = elecApproveInfo.Count; for (int i = 0; i < count; i++) { // 결재의견이 없을때 "-" 채워줌. 셀의 border 때문에... nếu không có ý kiến phê duyệt thì chèn "-" if (String.IsNullOrEmpty(elecApproveInfo[i].UserOpi)) { elecApproveInfo[i].UserOpi = "-"; } elecApporveHtml += "<tr align=\"center\">"; elecApporveHtml += "<td style=\"border-color:Black;border-style:solid\" rowspan=\"2\">" + bllElecApprove.ElecApproveKor(elecApproveInfo[i].Decision) + "</td>"; elecApporveHtml += "<td style=\"border-color:Black;border-style:solid\">" + elecApproveInfo[i].UserName + " " + elecApproveInfo[i].UserTitle + "</td>"; elecApporveHtml += "<td style=\"border-color:Black;border-style:solid\" rowspan=\"2\">" + elecApproveInfo[i].DepName + "</td>"; elecApporveHtml += "<td style=\"border-color:Black;border-style:solid\" rowspan=\"2\">" + elecApproveInfo[i].UserOpi + "</td>"; elecApporveHtml += "</tr>"; elecApporveHtml += "<tr align=\"center\">"; elecApporveHtml += "<td style=\"border-color:Black;border-style:solid\">" + HanaMicron.COMS.Utility.DateUtility.getDateFormat2(Convert.ToDateTime(elecApproveInfo[i].ViewDate)) + "</td>"; elecApporveHtml += "</tr>"; } // 반출 항목 보이기 hạng mịc tài sản ra cổng int seq = 0; for (int i = 0; i < 10; i++) //항목 10개 만듬 { seq = i + 1; if (i < takeOutItem.Count) //데이타 있는 만큼 데이타 뿌려줌. Đẩy dữ liệu tương ứng vào ô nhận dữ liệu { takeOutItemListHtml += "<tr align=\"center\">"; takeOutItemListHtml += "<td style=\"border-color:Black;border-style:solid\">" + seq + "</td>"; takeOutItemListHtml += "<td style=\"border-color:Black;border-style:solid\">" + takeOutItem[i].ParentCodeName + "</td>"; takeOutItemListHtml += "<td style=\"border-color:Black;border-style:solid\">" + takeOutItem[i].SubCodeName + "</td>"; takeOutItemListHtml += "<td style=\"border-color:Black;border-style:solid\">" + takeOutItem[i].TakeOutItemName + "</td>"; takeOutItemListHtml += "<td style=\"border-color:Black;border-style:solid\">" + takeOutItem[i].TakeOutItemType + "</td>"; takeOutItemListHtml += "<td style=\"border-color:Black;border-style:solid\">" + takeOutItem[i].UnitName + "</td>"; takeOutItemListHtml += "<td style=\"border-color:Black;border-style:solid\">" + takeOutItem[i].Account + "</td>"; takeOutItemListHtml += "<td style=\"border-color:Black;border-style:solid\"> </td>"; takeOutItemListHtml += "</tr>"; } else //데이타 없는 부분 공백으로 채움. Cho khoảng trống vào những ô không có dữ liệu { takeOutItemListHtml += "<tr align=\"center\">"; takeOutItemListHtml += "<td style=\"border-color:Black;border-style:solid\">" + seq + "</td>"; takeOutItemListHtml += "<td style=\"border-color:Black;border-style:solid\"> </td>"; takeOutItemListHtml += "<td style=\"border-color:Black;border-style:solid\"> </td>"; takeOutItemListHtml += "<td style=\"border-color:Black;border-style:solid\"> </td>"; takeOutItemListHtml += "<td style=\"border-color:Black;border-style:solid\"> </td>"; takeOutItemListHtml += "<td style=\"border-color:Black;border-style:solid\"> </td>"; takeOutItemListHtml += "<td style=\"border-color:Black;border-style:solid\"> </td>"; takeOutItemListHtml += "<td style=\"border-color:Black;border-style:solid\"> </td>"; takeOutItemListHtml += "</tr>"; } } }
/// <summary> /// 반출 정보 삭제 /// </summary> /// <param name="takeOutDataInfo"></param> /// <returns></returns> public int deleteTakeOutData(TakeOutDataInfo takeOutDataInfo) { return(dal.deleteTakeOutData(takeOutDataInfo)); }
/// <summary> /// 반출 정보 저장 /// </summary> /// <param name="takeOutDataInfo"></param> /// <returns></returns> public int insertTakeOutData(TakeOutDataInfo takeOutDataInfo) { return(dal.insertTakeOutData(takeOutDataInfo)); }
/// <summary> /// 반출 정보 수정 /// </summary> /// <param name="takeOutDataInfo"></param> /// <returns></returns> public int updateTakeOutData(TakeOutDataInfo takeOutDataInfo) { return(dal.updateTakeOutData(takeOutDataInfo)); }
/// <summary> /// 전자결재 용 HTML 만들기(반출) /// </summary> /// <param name="obj"></param> /// <returns></returns> public String MakeElecApproveContentsTakeOut(TakeOutDataInfo takeOutData) { StringBuilder str = new StringBuilder(); str.Append(@" <table width='100%' cellpadding='6' cellspacing='1' style='background-color:#CCCCCC'> <tr> <td colspan='6' class='contents_title' style='background-color:#FFFFFF'> <img src='http://house.hmicron.com/COMS/images/basic/icon_02.gif' alt='icon' style='vertical-align:middle'> Thông tin tài sản mang ra (반출 정보) </td> </tr> <tr> <td style='background-color:#F5F5F5'> Ngày mang ra dự định (반출예정일) </td> <td style='background-color:#FFFFFF'>" + takeOutData.ScheduleOutDate + @"</td> <td style='background-color:#F5F5F5'> Ngày mang vào dự định (반입예정일) </td> <td style='background-color:#FFFFFF'>" + takeOutData.ScheduleInDate + @"</td> </tr> <tr> <td style='background-color:#F5F5F5'> Mục đích mang ra (반출 목적) </td> <td style='background-color:#FFFFFF'>" + takeOutData.TakeOutObjectName + @"</td> <td style='background-color:#F5F5F5'> Mục đích chi tiết (세부 목적) </td> <td style='background-color:#FFFFFF'>" + takeOutData.ObjectContents + @"</td> </tr> <tr> <td style='background-color:#F5F5F5'> Có mang vào hay không? (반입 여부) </td> <td style='background-color:#FFFFFF'>" + requireKor(takeOutData.RequireIN) + @"</td> <td style='background-color:#F5F5F5'> Lý do từ chối mang vào (반입불가 사유) </td> <td style='background-color:#FFFFFF'>" + takeOutData.DisApprovalCategoryName + @"</td> </tr> <tr> <td style='background-color:#F5F5F5'> Công ty nhận (수령 회사) </td> <td style='background-color:#FFFFFF'>" + takeOutData.CompanyName + @"</td> <td style='background-color:#F5F5F5'> Người nhận (수령자) </td> <td style='background-color:#FFFFFF'>" + takeOutData.RecieveName + @"</td> </tr> </table> <br /> " ); str.Append(@" <table cellspacing='0' cellpadding='4' rules='all' border='1' style='background-color:White;border-color:#3366CC;border-width:1px;border-style:None;width:100%;border-collapse:collapse;'> <tr style='color:#CCCCFF;background-color:#003399;'> <td align='center' scope='col'>Tài sản lớn (대분류)</td><td align='center' scope='col'>Tài sản vừa (중분류)</td> <td align='center' scope='col'>Tên tài sản (품명)</td><td align='center' scope='col'>Quy cách (규격/Serial)</td> <td align='center' scope='col'>Đơn vị (단위)</td><td align='center' scope='col'>Số lượng (수량/Serial)</td> </tr>"); TakeOutItemData bllTakeOutItemData = new TakeOutItemData(); List <TakeOutItemDataInfo> list = bllTakeOutItemData.selectTakeOutItemDataList(takeOutData.TakeOutDataCode); foreach (TakeOutItemDataInfo subObj in list) { str.Append(@" <tr style='color:#003399;background-color:White;'> <td align='center'>" + subObj.ParentCodeName + @"</td> <td align='center'>" + subObj.SubCodeName + @"</td> <td align='center'>" + subObj.TakeOutItemName + @"</td> <td align='center'>" + subObj.TakeOutItemType + @"</td> <td align='center'>" + subObj.UnitName + @"</td> <td align='center'>" + subObj.Account + @"</td> </tr>"); } str.Append("</table>"); return(str.ToString()); }
//private String filepath; //private String filename; protected void Page_Load(object sender, EventArgs e) { bllTakeOutData = new TakeOutData(); bllTakeOutItemData = new TakeOutItemData(); bllVisitData = new VisitData(); String takeOutDataCode; // 반출 번호 mã ra ngoài // 로그인 체크 check login EmployeeInfo loginEmployee = new EmployeeInfo(); loginEmployee = (EmployeeInfo)Session["loginMember"]; if (loginEmployee == null) { Response.Redirect("~/login.aspx", true); } if (Page.IsPostBack) { //Createfolder(); // 2021-03-26 Nguyen Van An: file upload #region 일 업로드 String userFileMimeType1 = String.Empty; String userFileMimeType2 = String.Empty; String userFileMimeType3 = String.Empty; String userFileName1 = String.Empty; String userFileName2 = String.Empty; String userFileName3 = String.Empty; String userFileByte1 = String.Empty; String userFileByte2 = String.Empty; String userFileByte3 = String.Empty; String userFileDBName1 = String.Empty; String userFileDBName2 = String.Empty; String userFileDBName3 = String.Empty; String separator = "|"; // String fileUploadDir = ConfigurationManager.AppSettings["fileUploadPath"]; string[] arrFileName; string ext; if (userFile1.HasFile && checkfile(userFile1.FileName)) { //arrFileName = userFile1.FileName.Split('.'); //ext = arrFileName[arrFileName.Length - 1].ToLower(); //userFileName1 = HanaMicron.COMS.Utility.StringUtil.ReplaceSpecial(userFile1.FileName.Replace("." + ext, "")) + "." + ext; //String savePath1 = fileUploadDir + "\\" + (userFileName1); //userFileMimeType1 = userFile1.PostedFile.ContentType; //userFileByte1 = userFile1.PostedFile.ContentLength.ToString(); //userFile1.SaveAs(savePath1); // userFileDBName1 = userFileName1 ; String filename1 = DateTime.Now.ToString("yyyyMMdd_hhmmss_") + userFile1.FileName; String filepath = MapPath("~/image/" + filename1); userFile1.SaveAs(filepath); userFileDBName1 = filename1; } if (userFile2.HasFile && checkfile(userFile2.FileName)) { //arrFileName = userFile2.FileName.Split('.'); //ext = arrFileName[arrFileName.Length - 1].ToLower(); //userFileName2 = HanaMicron.COMS.Utility.StringUtil.ReplaceSpecial(userFile2.FileName.Replace("." + ext, "")) + "." + ext; //userFileMimeType2 = userFile2.PostedFile.ContentType; //userFileByte2 = userFile2.PostedFile.ContentLength.ToString(); //String savePath2 = fileUploadDir + "\\" + userFileName2; //userFile2.SaveAs(savePath2); //userFileDBName2 = userFileName2 + separator + userFileMimeType2 + separator + userFileByte2; String filename2 = DateTime.Now.ToString("yyyyMMdd_hhmmss_") + userFile2.FileName; String filepath = MapPath("~/image/" + filename2); userFile2.SaveAs(filepath); userFileDBName2 = filename2; } if (userFile3.HasFile && checkfile(userFile3.FileName)) { //arrFileName = userFile3.FileName.Split('.'); //ext = arrFileName[arrFileName.Length - 1].ToLower(); //userFileName3 = HanaMicron.COMS.Utility.StringUtil.ReplaceSpecial(userFile3.FileName.Replace("." + ext, "")) + "." + ext; //userFileMimeType3 = userFile3.PostedFile.ContentType; //userFileByte3 = userFile3.PostedFile.ContentLength.ToString(); //String savePath3 = fileUploadDir + "\\" + userFileName3; //userFile3.SaveAs(savePath3); //userFileDBName3 = userFileName3 ; String filename3 = DateTime.Now.ToString("yyyyMMdd_hhmmss_") + userFile3.FileName; String filepath = MapPath("~/image/" + filename3); userFile3.SaveAs(filepath); userFileDBName3 = filename3; } #endregion // 반출 정보 Data 만들기 tạo data thông tin ra ngoài TakeOutDataInfo takeOutDataInfo = new TakeOutDataInfo(); takeOutDataInfo.CompanyCode = Convert.ToInt32(Request["companyCode"]); takeOutDataInfo.RecieveName = Request["recieveName"]; takeOutDataInfo.RequestUserCode = loginEmployee.Upnid; takeOutDataInfo.RequireIN = Convert.ToInt32(Request["requireIN"]); //반입 필 여부 có/ không cần vào takeOutDataInfo.ObjectContents = Request["objectContents"]; //반입필 일 경우만 반입예정일 입력 if (takeOutDataInfo.RequireIN == 1) { takeOutDataInfo.ScheduleInDate = Request["scheduleInDate"]; } takeOutDataInfo.ScheduleOutDate = Request["scheduleOutDate"]; takeOutDataInfo.CarCode = Convert.ToInt32(Request["carCode"]); takeOutDataInfo.TakeOutStateCode = 0; takeOutDataInfo.TakeOutObjectCode = Convert.ToInt32(takeOutObjectCode.SelectedValue); //takeOutDataInfo.ApprovalUserCode = Request["approvalUserCode"]; takeOutDataInfo.TakeOutPathEndCode = Convert.ToInt32(takeOutPathEnd.SelectedValue); takeOutDataInfo.TakeOutPathStartCode = Convert.ToInt32(takeOutPathStart.SelectedValue); takeOutDataInfo.Note = Request["note"]; //반입불가 일때만 반입불가사유 입력 (수정시에도 해당됨) if (takeOutDataInfo.RequireIN == 2) { takeOutDataInfo.DisApprovalCategoryCode = Convert.ToInt32(disApprovalCategoryCode.SelectedValue); } takeOutDataInfo.DisApprovalCategoryDetail = Request["disApprovalCategoryDetail"]; takeOutDataInfo.ElecApproveCode = Request["elecApproveCode"]; // 신규 if (Request.QueryString["mode"].Equals("write")) { // 반출 번호 만들기 (물품 저장 될것을 위해서) takeOutDataCode = bllTakeOutData.selectNextTakeOutDataCode(); takeOutDataInfo.TakeOutDataCode = takeOutDataCode; takeOutDataInfo.ApprovalState = 0; takeOutDataInfo.UserFile1 = userFileDBName1; takeOutDataInfo.UserFile2 = userFileDBName2; takeOutDataInfo.UserFile3 = userFileDBName3; int result = bllTakeOutData.insertTakeOutData(takeOutDataInfo); } // 수정 else { takeOutDataCode = Request["takeOutDataCode"]; TakeOutDataInfo oldData = bllTakeOutData.selectTakeOutData(Request.QueryString["takeOutDataCode"]); takeOutDataInfo.TakeOutDataCode = takeOutDataCode; takeOutDataInfo.ApprovalState = 0; //takeOutDataInfo.TakeOutItemDataList[0].TakeOutTime = oldData.TakeOutItemDataList[0].TakeOutTime; //takeOutDataInfo.TakeOutItemDataList[0].TakeINTime = oldData.TakeOutItemDataList[0].TakeINTime; //takeOutDataInfo.ApproveTime = oldData.ApproveTime; takeOutDataInfo.ElecApproveCode = oldData.ElecApproveCode; if (!String.IsNullOrEmpty(userFileName1)) { takeOutDataInfo.UserFile1 = userFileDBName1; } if (!String.IsNullOrEmpty(userFileName2)) { takeOutDataInfo.UserFile2 = userFileDBName2; } if (!String.IsNullOrEmpty(userFileName3)) { takeOutDataInfo.UserFile3 = userFileDBName3; } int result = bllTakeOutData.updateTakeOutData(takeOutDataInfo); // 이전 물품 삭제 List <TakeOutItemDataInfo> takeOutItemList = bllTakeOutItemData.selectTakeOutItemDataList(oldData.TakeOutDataCode); for (int i = 0; i < takeOutItemList.Count; i++) { TakeOutItemDataInfo obj = (TakeOutItemDataInfo)takeOutItemList[i]; int resultDelete = bllTakeOutItemData.deleteTakeOutItemData(obj); } } // 반출 물품 정보 넣기 String subTakeOutItemCategoryCodes = Request["subTakeOutItemCategoryCodes"]; String[] arrSubTakeOutItemCategoryCode = subTakeOutItemCategoryCodes.Split(','); String takeOutItemNames = Request["takeOutItemNames"]; String[] arrTakeOutItemNames = takeOutItemNames.Split(','); String takeOutItemNameTypes = Request["takeOutItemNameTypes"]; String[] arrTakeOutItemNameTypes = takeOutItemNameTypes.Split(','); String takeOutItemAccounts = Request["takeOutItemAccounts"]; String[] arrTakeOutItemAccounts = takeOutItemAccounts.Split(','); String takeOutUnits = Request["takeOutUnits"]; String[] arrTakeOutUnits = takeOutUnits.Split(','); for (int i = 0; i < arrSubTakeOutItemCategoryCode.Length; i++) { if (!String.IsNullOrEmpty(arrSubTakeOutItemCategoryCode[i])) { TakeOutItemDataInfo takeOutItemDataInfo = new TakeOutItemDataInfo(); takeOutItemDataInfo.TakeOutDataCode = takeOutDataCode; takeOutItemDataInfo.SubCategoryCode = Convert.ToInt32(arrSubTakeOutItemCategoryCode[i]); takeOutItemDataInfo.TakeOutItemName = arrTakeOutItemNames[i]; takeOutItemDataInfo.TakeOutItemType = arrTakeOutItemNameTypes[i]; takeOutItemDataInfo.Account = Convert.ToInt32(arrTakeOutItemAccounts[i]); takeOutItemDataInfo.UnitCode = Convert.ToInt32(arrTakeOutUnits[i]); int itemResult = bllTakeOutItemData.insertTakeOutItemData(takeOutItemDataInfo); } } Response.Redirect("viewTakeOut.aspx?takeOutDataCode=" + takeOutDataCode, true); } else { // 신규 if (Request.QueryString["mode"].Equals("write")) { // 신규 결재 코드 가져오기 approveDocCode = bllVisitData.GetNewApproveCode(); } // 수정 else { // 반출 번호 TakeOutDataInfo oldData = bllTakeOutData.selectTakeOutData(Request.QueryString["takeOutDataCode"]); lblTakeOutDataCode.Text = Request["takeOutDataCode"]; scheduleDateTitle = oldData.ScheduleInDate; scheduleDateOut = oldData.ScheduleOutDate; takeOutObjectCode.SelectedValue = oldData.TakeOutObjectCode.ToString(); takeOutPathStart.SelectedValue = oldData.TakeOutPathStartCode.ToString(); takeOutPathEnd.SelectedValue = oldData.TakeOutPathEndCode.ToString(); objectContents = oldData.ObjectContents; companyCode = oldData.CompanyCode; companyName = oldData.CompanyName; recieveName = oldData.RecieveName; carCode = oldData.CarCode; carNumber = oldData.CarNumber; // 반입불가가 아닌경우(반입가능) 불가사유 없으므로 수정시 select 1로 하고 실제 저장시에는 저장 안되게 되어 있음. if (oldData.DisApprovalCategoryCode == 0) { disApprovalCategoryCode.SelectedValue = "20"; } else { disApprovalCategoryCode.SelectedValue = oldData.DisApprovalCategoryCode.ToString(); } disApprovalCategoryDetail = oldData.DisApprovalCategoryDetail; if (oldData.RequireIN == 1) { ckRequire1 = "checked"; } else { ckRequire2 = "checked"; } // 이전 물품 정보 보여주기 List <TakeOutItemDataInfo> takeOutItemList = bllTakeOutItemData.selectTakeOutItemDataList(Request.QueryString["takeOutDataCode"]); for (int i = 0; i < takeOutItemList.Count; i++) { TakeOutItemDataInfo obj = (TakeOutItemDataInfo)takeOutItemList[i]; arrTakeOutItemList += "parentCategory[" + i + "]='" + obj.ParentCategoryCode + "';\n"; arrTakeOutItemList += "subCategory[" + i + "]='" + obj.SubCategoryCode + "';\n"; arrTakeOutItemList += "itemName[" + i + "]='" + obj.TakeOutItemName + "';\n"; arrTakeOutItemList += "itemType[" + i + "]='" + obj.TakeOutItemType + "';\n"; arrTakeOutItemList += "account[" + i + "]='" + obj.Account.ToString() + "';\n"; arrTakeOutItemList += "unit[" + i + "]='" + obj.UnitCode + "';\n"; } displayCellCount = takeOutItemList.Count.ToString(); // 결재 코드 approveDocCode = oldData.ElecApproveCode; //첨부 파일 if (!String.IsNullOrEmpty(oldData.UserFile1)) { lblUserFile1.Text = "<a href='" + ConfigurationManager.AppSettings["fileOpenPath"] + "/" + bllTakeOutData.GetFileName(oldData.UserFile1) + "' target='_blank'>" + bllTakeOutData.GetFileName(oldData.UserFile1) + "</a>"; lblUserFile1.Text += "<a href='#;' onclick=\"confirmMove('Có chắc chắn xóa không? (정말로 삭제하시겠습니까?)','userFileDeleteTakeOut.aspx?takeOutDataCode=" + oldData.TakeOutDataCode + "&fileNumber=1&fileName=" + HttpUtility.UrlEncode(bllTakeOutData.GetFileName(oldData.UserFile1)) + "',document.dummy)\"><img src='../../images/icon/fileDelete.gif' align='absmiddle'></a>"; } if (!String.IsNullOrEmpty(oldData.UserFile2)) { String[] arrUserFile2 = oldData.UserFile2.Split('|'); lblUserFile2.Text = "<a href='" + ConfigurationManager.AppSettings["fileOpenPath"] + "/" + bllTakeOutData.GetFileName(oldData.UserFile2) + "' target='_blank'>" + bllTakeOutData.GetFileName(oldData.UserFile2) + "</a>"; lblUserFile2.Text += "<a href='#;' onclick=\"confirmMove('Có chắc chắn xóa không? (정말로 삭제하시겠습니까?)','userFileDeleteTakeOut.aspx?takeOutDataCode=" + oldData.TakeOutDataCode + "&fileNumber=2&fileName=" + HttpUtility.UrlEncode(bllTakeOutData.GetFileName(oldData.UserFile2)) + "',document.dummy)\"><img src='../../images/icon/fileDelete.gif' align='absmiddle'></a>"; } if (!String.IsNullOrEmpty(oldData.UserFile3)) { String[] arrUserFile3 = oldData.UserFile3.Split('|'); lblUserFile3.Text = "<a href='" + ConfigurationManager.AppSettings["fileOpenPath"] + "/" + bllTakeOutData.GetFileName(oldData.UserFile3) + "' target='_blank'>" + bllTakeOutData.GetFileName(oldData.UserFile3) + "</a>"; lblUserFile3.Text += "<a href='#;' onclick=\"confirmMove('Có chắc chắn xóa không? (정말로 삭제하시겠습니까?)','userFileDeleteTakeOut.aspx?takeOutDataCode=" + oldData.TakeOutDataCode + "&fileNumber=3&fileName=" + HttpUtility.UrlEncode(bllTakeOutData.GetFileName(oldData.UserFile3)) + "',document.dummy)\"><img src='../../images/icon/fileDelete.gif' align='absmiddle'></a>"; } note = oldData.Note; } // 임직원 정보 보이기 lblDepartment.Text = loginEmployee.Dep_name; lblUpnid.Text = loginEmployee.Upnid; lblOfficeName.Text = loginEmployee.OfficeName; lblDisplayName.Text = loginEmployee.DisplayName; lblTitle.Text = loginEmployee.Title_name; lblPhone.Text = loginEmployee.MobilePhoneNumber; // 대분류 가져오기 TakeOutItemCategory bllTakeOutItemCategory = new TakeOutItemCategory(); List <TakeOutItemCategoryInfo> categorylist = bllTakeOutItemCategory.selectTakeOutItemCategoryList(1, 0); for (int i = 0; i < categorylist.Count; i++) { TakeOutItemCategoryInfo itemCategory = (TakeOutItemCategoryInfo)categorylist[i]; itemCategoryNameList += "arrItemCategoryNameList[" + i + "] = '" + itemCategory.CodeName + "';\n"; itemCategoryCodeList += "arrItemCategoryCodeList[" + i + "] = '" + itemCategory.TakeOutItemCategoryCode + "';\n"; } // 단위 가져오기 HanaMicron.COMS.BLL.Unit bllUnit = new HanaMicron.COMS.BLL.Unit(); String unitSearchKey = "A"; List <UnitInfo> unitList = bllUnit.selectUnitList(unitSearchKey); for (int i = 0; i < unitList.Count; i++) { UnitInfo unitInfo = (UnitInfo)unitList[i]; unitNameList += "arrUnitNameList[" + i + "] = '" + unitInfo.CodeName + "';\n"; unitCodeList += "arrUnitCodeList[" + i + "] = '" + unitInfo.UnitCode + "';\n"; } } }
protected void Page_Load(object sender, EventArgs e) { // 로그인 체크 //EmployeeInfo loginEmployee = new EmployeeInfo(); //loginEmployee = (EmployeeInfo)Session["loginMember"]; //if (loginEmployee == null) //{ // Response.Redirect("~/login.aspx", true); //} if (this.Context.User.Identity.Name == null) { Response.Redirect("~/login.aspx", true); } EmployeeInfo loginEmployee = new EmployeeInfo(); EmployeeInfo requestEmployee = new EmployeeInfo(); Employee bllEmployee = new Employee(); loginEmployee = bllEmployee.selectEmployee(this.Context.User.Identity.Name); loginEmploeeDepartmentName = loginEmployee.Dep_name; loginEmploeeDisplayName = loginEmployee.DisplayName; loginEmployeeUpnid = loginEmployee.Upnid; loginEmployeeTitle = loginEmployee.Title_name; TakeOutDataInfo takeOutDataInfo = bll.selectTakeOutData(Request.QueryString["takeOutDataCode"]); //요청자 requestEmployee = bllEmployee.selectEmployee(takeOutDataInfo.RequestUserCode); // 신청자 보이기 -Hiển thị người đăng ký lblDepartment.Text = takeOutDataInfo.RequestUserDepartment; lblUpnid.Text = takeOutDataInfo.RequestUserCode; lblOfficeName.Text = takeOutDataInfo.RequestUserOfficeName; lblDisplayName.Text = takeOutDataInfo.RequestUserDisplayName; lblTitle.Text = takeOutDataInfo.RequestUserTitleName; lblPhone.Text = requestEmployee.MobilePhoneNumber; // 결재 정보의 기안제목 신청자로 변경 (2009.08.27 임종우) reqEmploeeDisplayName = takeOutDataInfo.RequestUserDisplayName; // 반출 정보 보이기 -Hiển thị thông tin xuất lblTakeOutDataCode.Text = takeOutDataInfo.TakeOutDataCode; lblScheduleDate.Text = takeOutDataInfo.ScheduleInDate; lblScheduleOutDate.Text = takeOutDataInfo.ScheduleOutDate; lblTakeOutObject.Text = takeOutDataInfo.TakeOutObjectName; lblTakeOutObjectContents.Text = takeOutDataInfo.ObjectContents; lblTakeOutPathStart.Text = takeOutDataInfo.TakeOutPathStartName; lblTakeOutPathEnd.Text = takeOutDataInfo.TakeOutPathEndName; lblCompanyName.Text = takeOutDataInfo.CompanyName; lblReceiveName.Text = takeOutDataInfo.RecieveName; lblRequireIN.Text = bll.requireKor(takeOutDataInfo.RequireIN); lblOutTime.Text = takeOutDataInfo.TakeOutItemDataList[0].TakeOutTime; lblINTime.Text = takeOutDataInfo.TakeOutItemDataList[0].TakeINTime; lblNote.Text = takeOutDataInfo.Note; viewimage1.Visible = false; viewimage2.Visible = false; viewimage3.Visible = false; if (takeOutDataInfo.UserFile1.Length > 0) { viewimage1.Visible = true; viewimage1.ImageUrl = "~/image/" + takeOutDataInfo.UserFile1.ToString(); } if (takeOutDataInfo.UserFile2.Length > 0) { viewimage2.Visible = true; viewimage2.ImageUrl = "~/image/" + takeOutDataInfo.UserFile2.ToString(); } if (takeOutDataInfo.UserFile3.Length > 0) { viewimage3.Visible = true; viewimage3.ImageUrl = "~/image/" + takeOutDataInfo.UserFile3.ToString(); } // 결재 코드 elecApproveCode = takeOutDataInfo.ElecApproveCode; // 반입필이면 반입불가사유 안보임. if (takeOutDataInfo.RequireIN == 1) { lblDisApproveName.Text = string.Empty; lblDisApproveDetail.Text = string.Empty; } else { lblDisApproveName.Text = takeOutDataInfo.DisApprovalCategoryName; lblDisApproveDetail.Text = takeOutDataInfo.DisApprovalCategoryDetail; } lblCarNumber.Text = takeOutDataInfo.CarNumber; //lblINTime.Text = bll.timeKor(takeOutDataInfo.TakeINTime); //lblOutTime.Text = bll.timeKor(takeOutDataInfo.TakeOutTime); // 결재 상신 전이라면 if (takeOutDataInfo.ApprovalState == 0) { // 결재라인 변경 이미지 btnElecApproveLine.Visible = true; // 결재 상신 버튼 btnApproveStart.Visible = true; // 결재 상태 보기 // btnElectStatus.Visible = false; // 반출증 출력 // btnPrint.Visible = false; // 반입일자 연장 신청 btnReElecApproveLine.Visible = false; } else if (takeOutDataInfo.ApprovalState == 2) // 결재완료시 { // btnElectStatus.Visible = false; btnApproveStart.Visible = false; btnElecApproveLine.Visible = false; // btnPrint.Visible = true; // 반출예정일이 지난 것들 반입일자 연장 신청 표시 --> 반입예정일 7일전부터 연장 표시로 변경 if (takeOutDataInfo.RequireIN == 1 && takeOutDataInfo.TakeOutItemDataList[0].TakeINTime == "-" && takeOutDataInfo.TakeOutItemDataList[0].TakeOutTime != "-") { if (Convert.ToDateTime(takeOutDataInfo.ScheduleInDate) < DateTime.Now.AddDays(7)) { btnReElecApproveLine.Visible = true; } else { btnReElecApproveLine.Visible = false; } } else { btnReElecApproveLine.Visible = false; } } else // 그 외에 { // btnElectStatus.Visible = false; btnApproveStart.Visible = false; btnElecApproveLine.Visible = false; // btnPrint.Visible = false; btnReElecApproveLine.Visible = false; } }
protected void GridView1_RowDataBound1(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { TakeOutDataInfo obj = (TakeOutDataInfo)e.Row.DataItem; e.Row.Cells[1].Text = bll.timeKor(obj.TakeOutItemDataList[0].TakeOutTime); //반출일 ngày mang ra e.Row.Cells[2].Text = obj.RequestUserDisplayName; //신청자 người đăng ký e.Row.Cells[3].Text = StringUtil.GetShortString(obj.CompanyName, 100, "..."); //반출처 địa điểm mang ra e.Row.Cells[4].Text = StringUtil.GetShortString(obj.RecieveName, 50, "..."); //수령자 người nhận e.Row.Cells[5].Text = bll.requireKor(obj.RequireIN); // 반입여부 e.Row.Cells[6].Text = StringUtil.GetShortString(obj.TakeOutItemDataList[0].TakeOutItemName, 18, "..."); //반출항목 hạng mục tài sản ra //반입일 표시 hiển thị ngày mang vào if (obj.RequireIN == 2) { e.Row.Cells[10].Text = "Không thể mang vào 반입불가"; } else { e.Row.Cells[10].Text = bll.timeKor(obj.TakeOutItemDataList[0].TakeINTime); //반입일 ngày mang vào } e.Row.Cells[11].Text = bll.getApproveStringKOR(obj); //결재상태 tình trạng phê duyệt for (int i = 0; i < e.Row.Cells.Count; i++) { if (i < 12) { e.Row.Cells[i].Attributes.Add("onclick", "window.location='../takeOut/viewTakeOut.aspx?takeOutDataCode=" + obj.TakeOutDataCode + "';"); e.Row.Cells[i].Attributes.Add("style", "cursor:hand;"); } } if (obj.ApprovalState == 2) //결재상태(결재완료) tình trạng phê duyệt (hoàn thành phê duyệt ) { //stKeyWord = Request.Form["keyWord"]; //stKey = Request.Form["key"]; if (obj.TakeOutItemDataList[0].TakeOutTime == "-") //반출시간데이터 유무 확인 { //HyperLink colINTime = (HyperLink)e.Row.Cells[11].Controls[0]; //colINTime.NavigateUrl = "javascript:confirmMove('반출 처리 하시겠습니까?','takeOutTimeUpdate.aspx?takeOutDataCode=" + obj.TakeOutDataCode + "&mode=outTime')"; //colINTime.Text = "<span style=\"color:blue\">반출 처리</span>"; //if (Convert.ToDateTime(obj.ScheduleOutDate) >= DateTime.Now.Date) // 반출예정일 지나지 않은것만 반출처리 //{ e.Row.Cells[12].Text = "<a href='#;' onClick=\"javascript:confirmMove('Bạn có muốn xử lý tài sản ra cổng không? (일괄 반출 처리 하시겠습니까?)','takeOutTimeUpdate.aspx?takeOutDataCode=" + obj.TakeOutDataCode + "&keyWord=" + Request["keyWord"] + "&key=" + Request["key"] + "&mode=outTime')\">"; //e.Row.Cells[12].Text = "<a href='#;' onClick=\"javascript:confirmMove('일괄 반출 처리 하시겠습니까?','takeOutTimeUpdate.aspx?takeOutDataCode=" + obj.TakeOutDataCode + "&mode=outTime')\">"; e.Row.Cells[12].Text += "<span style=\"color:blue\">Xử lý mang ra (반출 처리)</span></a>"; //} } else { if (obj.RequireIN == 1 && obj.TakeOutItemDataList[0].TakeINTime == "-") //반입필 Cần mang vào { e.Row.Cells[12].Text = "<a href='#;' onClick=\"javascript:confirmMove('Bạn có muốn xử lý vào cổng không? (반입 처리 하시겠습니까?)','takeOutTimeUpdate.aspx?takeOutItemDataCode=" + obj.TakeOutItemDataList[0].TakeOutItemDataCode + "&keyWord=" + Request["keyWord"] + "&key=" + Request["key"] + "&mode=inTime')\">"; //e.Row.Cells[12].Text = "<a href='#;' onClick=\"javascript:confirmMove('반입 처리 하시겠습니까?','takeOutTimeUpdate.aspx?takeOutItemDataCode=" + obj.TakeOutItemDataList[0].TakeOutItemDataCode + "&mode=inTime')\">"; e.Row.Cells[12].Text += "<span style=\"color:red\">Xử lý mang vào (반입 처리)</span></a>"; } else { e.Row.Cells[12].Text = "<span style=\"color:blue\">Kết thúc (종료)</span></a>"; } } } // 2017-09-06-임종우 : 그룹웨어 Interface 오류가 많아 수동으로 결재승인 처리 로직 추가. 결재상신중이면 강제 결재 승인 가능하도록 추가. else if (obj.ApprovalState == 1) { e.Row.Cells[12].Text = "<a href='#;' onClick=\"javascript:confirmMove('Bạn có muốn xử lý phê duyệt điện tử không? (결재 승인 처리 하시겠습니까?)','elecApproveUpdate.aspx?takeOutDataCode=" + obj.TakeOutDataCode + "&status=2" + "&keyWord=" + Request["keyWord"] + "&key=" + Request["key"] + "&mode=takeOut')\">"; e.Row.Cells[12].Text += "<span style=\"color:Green\">Đồng ý phê duyệt (결재 승인)</span></a>"; } else { e.Row.Cells[12].Text = ""; } //반입예정일이 지난 것들 색상 표시 if (obj.RequireIN == 1 && obj.TakeOutItemDataList[0].TakeINTime == "-" && obj.TakeOutItemDataList[0].TakeOutTime != "-") { if (Convert.ToDateTime(obj.ScheduleInDate) < DateTime.Now.Date) { e.Row.Attributes.Add("style", "background-color:#FFF7A2;"); e.Row.Attributes.Add("onmouseover", "this.style.backgroundColor='#C0C0C0'"); e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor='#FFF7A2'"); } else { e.Row.Attributes.Add("onmouseover", "this.style.backgroundColor='#C0C0C0'"); e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor='#FFFFFF'"); } } else { e.Row.Attributes.Add("onmouseover", "this.style.backgroundColor='#C0C0C0'"); e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor='#FFFFFF'"); } } }
public String elecApproveType; //전자결재 타입(반출:takeOut,내방:visit,보안카드:secCard) loại phê duyệt điện tử () protected void Page_Load(object sender, EventArgs e) { // 로그인 체크 check login EmployeeInfo loginEmployee = new EmployeeInfo(); loginEmployee = (EmployeeInfo)Session["loginMember"]; if (loginEmployee == null) { Response.Redirect("~/login.aspx", true); } loginEmploeeDepartmentName = loginEmployee.Dep_name; loginEmploeeDisplayName = loginEmployee.DisplayName; loginEmployeeUpnid = loginEmployee.Upnid; // 전자결재 타입 elecApproveType = Request.QueryString["elecApproveType"]; VisitData bll = new VisitData(); VisitDataInfo obj = new VisitDataInfo(); TakeOutData bllTakeOut = new TakeOutData(); TakeOutDataInfo takeOutData = new TakeOutDataInfo(); SecCardData bllSecCard = new SecCardData(); SecCardDataInfo secCardData = new SecCardDataInfo(); if (elecApproveType.Equals("visit")) // 내방 부분 phần visit { obj = bll.selectVisitData(Request["visitDataCode"]); if (obj.VisitFlag == 1) { doc_title = "[Đăng ký khách thăm dài hạn] ([장기내방신청])"; } else { doc_title = "Đăng ký khách thăm ([내방신청])"; } elecApproveContents = bll.MakeElecApproveContents(obj); //내방 전자결재 web.config에 등록된 카테고리 코드. 전자결재 Legacy 연동시 사용함. elecCategoryCode = ConfigurationManager.AppSettings["elecCategoryCode"]; } else if (elecApproveType.Equals("secCard")) // 반출 부분 { secCardData = bllSecCard.selectSecCardData(Request["secCardDataCode"]); doc_title = "[Mẫu đăng ký ra/vào (Card Reader)] ([출입(카드리더기)등록 신청서])"; elecApproveContents = bllSecCard.MakeElecApproveContents(secCardData); //반출 전자결재 web.config에 등록된 카테고리 코드. 전자결재 Legacy 연동시 사용함. elecCategoryCode = ConfigurationManager.AppSettings["elecCategoryCodeAll"]; bllSecCard.updateApprove(secCardData.ElecApproveCode, "1", ""); } else // 반출 부분 { takeOutData = bllTakeOut.selectTakeOutData(Request["takeOutDataCode"]); doc_title = "[Đăng ký mang ra] ([반출신청])"; elecApproveContents = bllTakeOut.MakeElecApproveContentsTakeOut(takeOutData); //반출 전자결재 web.config에 등록된 카테고리 코드. 전자결재 Legacy 연동시 사용함. elecCategoryCode = ConfigurationManager.AppSettings["elecCategoryCodeTakeOut"]; } form_code = ConfigurationManager.AppSettings["elecApproveFormCode"]; doc_term = "1"; sec_level = "M"; user_id = loginEmployee.Upnid; user_Title = loginEmployee.Title_name; user_depName = loginEmployee.Dep_name; user_name = loginEmployee.DisplayName; attach_flag = "0"; if (elecApproveType.Equals("visit")) //내방부분 { if (!String.IsNullOrEmpty(obj.UserFile1)) { attach_str += MakeFileString(obj.UserFile1) + ";"; attach_flag = "1"; } if (!String.IsNullOrEmpty(obj.UserFile2)) { attach_str += MakeFileString(obj.UserFile2) + ";"; attach_flag = "1"; } if (!String.IsNullOrEmpty(obj.UserFile3)) { attach_str += MakeFileString(obj.UserFile3) + ";"; attach_flag = "1"; } bll.updateApprove(Request["visitDataCode"], "1", ""); } else //반출 부분 { if (!String.IsNullOrEmpty(takeOutData.UserFile1)) { attach_str += MakeFileString(takeOutData.UserFile1) + ";"; attach_flag = "1"; } if (!String.IsNullOrEmpty(takeOutData.UserFile2)) { attach_str += MakeFileString(takeOutData.UserFile2) + ";"; attach_flag = "1"; } if (!String.IsNullOrEmpty(takeOutData.UserFile3)) { attach_str += MakeFileString(takeOutData.UserFile3) + ";"; attach_flag = "1"; } bllTakeOut.updateApprove(Request["takeOutDataCode"], "1", ""); } }