| | |
| | | using CY.SQLDAL; |
| | | using System.Data.SqlClient; |
| | | using CY.Infrastructure.Logging; |
| | | using CY.WebForm.Helper; |
| | | |
| | | namespace CY.WebForm.Pages.business |
| | | { |
| | |
| | | else |
| | | { |
| | | JavaScript.MessageBox("请先保存客户", this); |
| | | return; |
| | | } |
| | | |
| | | if (this.txtVisitTime.Value == "") |
| | | { |
| | | JavaScript.MessageBox("请选择日期", this); |
| | | return; |
| | | |
| | | } |
| | | if (this.txtVisitTime.Value == "") |
| | | { |
| | | JavaScript.MessageBox("请填写维护记录", this); |
| | | return; |
| | | |
| | | } |
| | | if (this.txtvisitRemark.Value.Trim() == "") |
| | | { |
| | | JavaScript.MessageBox("请填写维护记录", this); |
| | | return; |
| | | |
| | | } |
| | | |
| | | var files = Request.Files; |
| | | List<HttpPostedFile> fileList = new List<HttpPostedFile>(); |
| | | if (files.Count > 0) |
| | | { |
| | | HttpPostedFile postedFile; |
| | | |
| | | |
| | | |
| | | for (int i = 0; i < files.Count; i++) |
| | | { |
| | | |
| | | if (files.Keys[i] == "filesel") |
| | | { |
| | | postedFile = files[i]; |
| | | if (postedFile.ContentLength == 0) |
| | | continue; |
| | | if (postedFile.ContentLength > 2 * 1024 * 1024) |
| | | { |
| | | JavaScript.MessageBox("上传文件大小必须小于2M", this); |
| | | return; |
| | | } |
| | | |
| | | |
| | | |
| | | fileList.Add(postedFile); |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | m_OA_CorporateClientsVisit.Keyid = Guid.NewGuid(); |
| | | |
| | |
| | | |
| | | m_OA_CorporateClientsVisit.VisitTime = this.txtVisitTime.Value.ToDateTime2(); |
| | | |
| | | m_OA_CorporateClientsVisit.Remark = this.txtvisitRemark.Value.ToString2(); |
| | | m_OA_CorporateClientsVisit.Remark = this.txtvisitRemark.Value.Trim(); |
| | | m_OA_CorporateClientsVisit.Creater = CurrentUser.TrueMemberId; |
| | | m_OA_CorporateClientsVisit.CreateTime = DateTime.Now; |
| | | m_OA_CorporateClientsVisit.Updater = CurrentUser.TrueMemberId; |
| | |
| | | |
| | | if (result) |
| | | { |
| | | //this.RepClientList.DataSource = bll_OA_CorporateClientsBLL.SelectVisitListByCorId(Keyid); |
| | | //this.RepClientList.DataBind(); |
| | | if (fileList.Count > 0) |
| | | { |
| | | upLoadContractFile uploadContract = new upLoadContractFile(); |
| | | foreach (var file in fileList) |
| | | { |
| | | var re = uploadContract.UploadFile(file, "ClientVisit", file.FileName); |
| | | var oa_Attachment = new OA_attachment(); |
| | | oa_Attachment.OA_Id = m_OA_CorporateClientsVisit.Keyid; |
| | | oa_Attachment.AttachmentType = 99; |
| | | oa_Attachment.PlanAttachment = re; |
| | | oa_Attachment.CreateTime = DateTime.Now; |
| | | oa_Attachment.Operator = CurrentUser.TrueName; |
| | | oa_Attachment.AttachmentName = file.FileName; |
| | | oa_Attachment.AttachmentHouzhui = System.IO.Path.GetExtension(file.FileName).ToLower(); |
| | | bll_OA_CorporateClientsBLL.Insertattachment(oa_Attachment); |
| | | } |
| | | } |
| | | this.txtVisitTime.Value = ""; |
| | | this.txtvisitRemark.Value = ""; |
| | | JavaScript.MessageBox("维护保存成功", this, false, false); |
| | | // JavaScript.MessageBox("维护保存成功", this, false, false); |
| | | JavaScript.MessageBoxandhideLoadingIndicator("保存成功", this); |
| | | if (NeedWeihu) |
| | | { |
| | | |
| | |
| | | JavaScript.MessageBox("维护保存失败", this); |
| | | this.RepClientList.DataSource = bll_OA_CorporateClientsBLL.SelectVisitListByCorId(Request["Keyid"].ToGuid2()); |
| | | this.RepClientList.DataBind(); |
| | | //Province = CurrentUser.Province; |
| | | //City = CurrentUser.City; |
| | | //County = CurrentUser.County; |
| | | //BindData(); |
| | | if (IsWeihuTixingUrl) |
| | | JavaScript.RefreshDIVOpener(this); |
| | | #endregion |