public DTO.ResponseMessage <bool> UpdateOIC(string userId, string oicUserName, string preNameCode, string firstName, string lastName, string sex, string memberType, byte[] imgSign) { if (memberType == "5") { DTO.ResponseMessage <bool> res = new DTO.ResponseMessage <bool>(); FileManagement.RemoteFileInfo remote = new FileManagement.RemoteFileInfo(); FileManagement.FileServiceClient svc_file = new FileManagement.FileServiceClient(); Stream stream = new MemoryStream(imgSign); remote.FileByteStream = stream; remote.firstName = firstName; remote.lastName = lastName; remote.memberType = memberType; remote.oicUserName = oicUserName; remote.preNameCode = preNameCode; remote.sex = sex; remote.userId = userId; svc_file.UpdateOIC(firstName, lastName, memberType, oicUserName, preNameCode, sex, userId, stream); return(res); } else { return(svc.UpdateOIC(userId, oicUserName, preNameCode, firstName, lastName, sex, memberType, imgSign)); } }
public DTO.ResponseMessage <bool> ValidateApplicantSingleBeforeSubmit(IEnumerable <DTO.ApplicantTemp> app) { DTO.ResponseMessage <bool> response = new DTO.ResponseMessage <bool>(); //ValidateApplicantSingleBeforeSubmitRequest applicants = new ValidateApplicantSingleBeforeSubmitRequest() { Applicants = app }; //return svc.ValidateApplicantSingleBeforeSubmit(applicants); //return response; FileManagement.FileServiceClient file = new FileManagement.FileServiceClient(); return(file.ValidateApplicantSingleBeforeSubmit(app.ToArray())); }
/// <summary> /// เพิ่มข้อมูล User ที่เป็น คปภ. /// </summary> /// <param name="employeeNo">รหัสพนักงาน คปภ.</param> /// <param name="preNameCode">รหัสคำนำ</param> /// <param name="firstName">ชื่อ</param> /// <param name="lastName">นามสกุล</param> /// <param name="sex">เพศ M=ชาย, F=หญิง</param> /// <returns>ResponseMessage<bool></returns> public DTO.ResponseMessage <bool> InsertOIC(string oicEmpNo, string oicUserName, string preNameCode, string firstName, string lastName, string sex, string oicTypeCode, byte[] sign) { //ไม่ต้องเซ็ค รหัส AD ของเจ้าหน้าที่ คปภ. if (svc.IsRightUserOIC(oicUserName).ResultMessage) { // if(true) if (oicTypeCode == "2") { DTO.ResponseMessage <bool> res = new DTO.ResponseMessage <bool>(); FileManagement.FileServiceClient svc_file = new FileManagement.FileServiceClient(); Stream stream = new MemoryStream(sign); try { svc_file.InsertOIC(firstName, lastName, oicEmpNo, oicTypeCode, oicUserName, preNameCode, sex, stream); } catch (Exception ex) { res.ErrorMsg = "กรุณาติดต่อผู้ดูแลระบบ"; } return(res); } else { return(svc.InsertOIC(oicEmpNo, oicUserName, preNameCode, firstName, lastName, sex, oicTypeCode, sign)); } } else { DTO.ResponseMessage <bool> res = new DTO.ResponseMessage <bool>(); res.ResultMessage = false; res.ErrorMsg = Resources.errorPersonBiz_002 + oicUserName + Resources.errorPersonBiz_003; return(res); } }