protected void Page_Load(object sender, EventArgs e) { if (DocumentID > 0) { DocumentDetail.BindData(DocumentServices.GetById(DocumentID).WrapInList()); } }
protected override void ShowObjectInformation() { item = DocumentServices.GetById(LongId); ViewState["CurrentObject"] = item; SoHieuVanBan.Text = item.DocumentCode; NgayBanHanh.Text = item.ReleaseDate.ToDateString(); TrichYeu.Text = item.MainContent; LoaiVanBan.SelectByValue(item.DocumentCategoryID); if (item.SignerID > 0) { NguoiKy.SelectByValue(item.SignerID); NguoiSoanThao.SelectByValue(item.WriterID); VanBanNgoai.Checked = false; TenNguoiKy.Visible = false; NguoiKy.Visible = true; SoanThaoPH.Visible = true; } else { VanBanNgoai.Checked = true; TenNguoiKy.Visible = true; NguoiKy.Visible = false; SoanThaoPH.Visible = false; } VanBanNgoai.Enabled = false; }
protected override void CreateNewObject() { item = new Document(); item.DocumentCategoryID = LoaiVanBan.SelectedValue.ToInteger(); item.DocumentCode = SoHieuVanBan.Text.Trim().ToUpper(); if (VanBanNgoai.Checked) { item.SignerName = TenNguoiKy.Text; } else { item.SignerID = NguoiKy.SelectedValue.ToInteger(); item.SignerName = NguoiKy.SelectedItem.Text; item.WriterID = NguoiSoanThao.SelectedValue.ToInteger(); } item.ReleaseDate = NgayBanHanh.Text.ToDateTime(); item.MainContent = TrichYeu.Text.Trim(); item.VBDHCode = Parameters.VbdhCode; DocumentServices.Create(item); DocumentFileServices.CreateDocumentFile(item, fileContent: FileDinhKem.PostedFile, fileName: FileDinhKem.PostedFile?.FileName, uploadFolder: AppSettings.UploadFolder); ExceptionlessClient.Default.SubmitEvent(new Event { Message = $"Nhập thông tin văn bản số {item.DocumentCode} ({Sessions.DisplayName})", Type = "Nhập văn bản", Source = AppSettings.AGENCY_NAME }); Redirector.Redirect(ViewNames.SubAgency.YKCD_QuanLy, ParameterNames.Pid, item.DocumentID); }
protected void DocumentDeleteClicked(object o, EventArgs e) { var d = new DocumentServices().GetByID(Convert.ToInt32((o as LinkButton).Attributes["itemid"])); new DocumentServices().Delete(d); LoadDocuments(true); }
public string GetColor(DateTime mettingTime, int documentID) { if (documentID <= 0) { if (HolidayServices.GetBusinessDays(mettingTime, DateTime.Now) > 3) { return("text-out-term"); } else { return(""); } } else { Document document = DocumentServices.GetById(documentID); if (HolidayServices.GetBusinessDays(mettingTime, document.ReleaseDate) > 3) { return("text-out-term"); } else { return(""); } } }
public static Document SaveDocument(this RequestElement requestElement, string uploadFolder) { if (requestElement.DocumentID > 0) { var document = DocumentServices.GetByAgencyID(requestElement.DocumentID); if (document == null) { document = requestElement.ToDocument(); DocumentServices.Create(document); if (requestElement.DanhSachFile != null) { foreach (var docFile in requestElement.DanhSachFile.Where(r => r?.Content != null && !string.IsNullOrEmpty(r.FileName))) { DocumentFileServices.CreateDocumentFile(document, docFile.Content, docFile.FileName, uploadFolder); } } } else { document.SignerName = requestElement.SignerName; document.DocumentCode = requestElement.DocumentCode; document.MainContent = requestElement.MainContent; document.ReleaseDate = requestElement.ReleasedDate; DocumentServices.Update(document); } return(document); } return(null); }
protected override void GetDataList() { BaseCollection = DocumentServices.GetList(fromDate: TuNgay.Text.ToDateTime(), toDate: DenNgay.Text.ToDateTime(), agencyDocument: true) .OrderBy(item => item?.Writer?.Department?.DisplayOrder) .ThenBy(item => item?.Writer?.DepartmentID); }
protected override void UpdateObject() { item = (Document)ViewState["CurrentObject"]; item.DocumentCategoryID = LoaiVanBan.SelectedValue.ToInteger(); item.DocumentCode = SoHieuVanBan.Text.Trim().ToUpper(); if (VanBanNgoai.Checked) { item.SignerName = TenNguoiKy.Text; } else { item.SignerID = NguoiKy.SelectedValue.ToInteger(); item.SignerName = NguoiKy.SelectedItem.Text; item.WriterID = NguoiSoanThao.SelectedValue.ToInteger(); } item.ReleaseDate = NgayBanHanh.Text.ToDateTime(); item.MainContent = TrichYeu.Text.Trim(); DocumentServices.Update(item); DocumentFileServices.CreateDocumentFile(item, FileDinhKem.PostedFile, FileDinhKem.PostedFile?.FileName, AppSettings.UploadFolder); ExceptionlessClient.Default.SubmitEvent(new Event { Message = $"Cập nhật thông tin văn bản số {item.DocumentCode} ({Sessions.DisplayName})", Type = "Cập nhật văn bản", Source = AppSettings.AGENCY_NAME }); Redirector.Redirect(ViewNames.Agency.VanBan_DanhSach); }
protected override void BindValueToPageControls() { foreach (var doc in DocumentServices.GetList(userId: Sessions.UserID).OrderByDescending(item => item.ReleaseDate)) { VanBan.AddSelectItem($"{doc.DocumentCode} - {doc.ReleaseDate.ToDateString()} - {doc.MainContent}", doc.DocumentID.ToString()); } }
protected override void GetDataList() { var ketQua = RequestServices.ThongKeTheoTatCaChuyenVienTheoDoi() .Where(item => (item.GroupID == 2 || item.GroupID == 6) && !item.ObjectName.Equals("Nguyễn Hữu Phước")) .ToList(); BaseCollection = ketQua; tongCong = new SoLieuThongKe { NotPerformInTerm = ketQua.Sum(i => i.NotPerformInTerm), NotPerformOutTerm = ketQua.Sum(i => i.NotPerformOutTerm), PerformingInTerm = ketQua.Sum(i => i.PerformingInTerm), PerformingOutTerm = ketQua.Sum(i => i.PerformingOutTerm), WaitToConfirm = ketQua.Sum(i => i.WaitToConfirm), DoneInTerm = ketQua.Sum(i => i.DoneInTerm), DoneOutTerm = ketQua.Sum(i => i.DoneOutTerm) }; var requestInWeek = DocumentServices.GetList(fromDate: TuNgay.Text.ToDateTimeNullable(), toDate: DenNgay.Text.ToDateTimeNullable()) .Where(doc => doc.Writer.DepartmentID == 2 || doc.Writer.DepartmentID == 6 && doc.WriterID != 26).ToList().Sum(doc => doc.Requests.Count); lbYkcdBanHanhTrongTuan.Text = requestInWeek.ToString(); lbChuaThucHien.Text = (tongCong.NotPerformInTerm + tongCong.NotPerformOutTerm).ToString(); lbChuaDenHan.Text = tongCong.NotPerformInTerm.ToString(); lbTreHan.Text = tongCong.NotPerformOutTerm.ToString(); lbDangThucHien.Text = (tongCong.PerformingInTerm + tongCong.PerformingOutTerm).ToString(); }
protected override void CreateNewObject() { item = new Document(); item.DocumentCategoryID = LoaiVanBan.SelectedValue.ToInteger(); item.DocumentCode = SoHieuVanBan.Text.Trim().ToUpper(); item.SignerID = NguoiKy.SelectedValue.ToInteger(); item.SignerName = NguoiKy.SelectedItem.Text; item.WriterID = NguoiSoanThao.SelectedValue.ToInteger(); item.ReleaseDate = NgayBanHanh.Text.ToDateTime(); item.MainContent = TrichYeu.Text.Trim(); item.VBDHCode = Parameters.VbdhCode; DocumentServices.Create(item); if (!string.IsNullOrEmpty(Parameters.VbdhCode)) { var VBDi = ViewState["SyncDoc"] as VBDiDTO; foreach (FileDinhKemDTO file in VBDi.FileDinhKems) { DocumentFileServices.CreateDocumentFile(item, file.DuLieu, file.TenFileDinhKem, AppSettings.UploadFolder); } } else { DocumentFileServices.CreateDocumentFile(item, fileContent: FileDinhKem.PostedFile, fileName: FileDinhKem.PostedFile.FileName, uploadFolder: AppSettings.UploadFolder); } ExceptionlessClient.Default.SubmitEvent(new Event { Message = $"Nhập thông tin văn bản số {item.DocumentCode} ({Sessions.DisplayName})", Type = "Nhập văn bản", Source = "YKCD_UBND" }); Redirector.Redirect(ViewNames.Province.YKCD_QuanLy, ParameterNames.Pid, item.DocumentID); }
public FormInsert() { InitializeComponent(); _documentServices = new DocumentServices(); metroRadioButtTesis.Checked = true; InitializeListViews(); }
virtual public MpaAction CreatePlainText(string input) { Document plainText = DocumentServices.CreatePlainText(input); return(new MpaAction { Message = input, Action = Actions.PlainText, Content = plainText, Environment = GetEnviromentType() }); }
virtual public MpaAction CreateMediaLink(string input) { Document mediaResponse = DocumentServices.CreateMediaDocument(input); return(new MpaAction { Message = input, Action = Actions.MediaLink, Content = mediaResponse, Environment = GetEnviromentType() }); }
protected void Page_Load(object sender, EventArgs e) { if (Parameters.Id > 0) { ThongTinVanBanControl.DocumentID = Parameters.Id; lvData.BindData(DocumentServices.GetById(Parameters.Id).Requests); } }
virtual public MpaAction CreateQuickReply(string input) { Document selectMsg = DocumentServices.CreateSelectDocument(input.Replace("#quickreply#", "").Trim()); return(new MpaAction { Message = input, Action = Actions.QuickReply, Content = selectMsg, Environment = GetEnviromentType() }); }
protected void Page_Load(object sender, EventArgs e) { ThongTinVanBanControl.DocumentID = Parameters.Id; if (!IsPostBack) { var document = DocumentServices.GetById(Parameters.Id); txtBaoCaoTongHop.Text = $@"<center><b>BÁO CÁO <br> Tình hình thực hiện nội dung giao nhiệm vụ tại Công văn số { document.DocumentCode} <br> ngày {document.ReleaseDate.ToDateString()} của UBND tỉnh.</b></center><br> Ngày {document.ReleaseDate.ToDateString()}, UBND tỉnh đã ban hành Công văn số { document.DocumentCode} V/v: { document.MainContent} giao nhiệm vụ cho các đơn vị; qua tổng hợp, Văn phòng UBND tỉnh kính báo cáo UBND tỉnh tình hình thực hiện như sau:<br> <table border='1' cellpadding='2' cellspacing='0' width='100%'> <tbody> <tr> <td><b> STT </b></td> <td><b> Nội dung giao nhiệm vụ</b></td> <td><b> Ngày yêu cầu</b></td> <td><b> Đơn vị theo dõi </b></td> <td><b> Tình trạng </b></td> <td><b> Tình hình thực hiện </b></td> </tr>"; int totalRows; var listItems = RequestServices.GetList(MaVanBan: document.DocumentID); int stt = 1; if (listItems != null && listItems.Count > 0) { foreach (Request item in listItems) { txtBaoCaoTongHop.Text += $@"<tr> <td>{stt}</td> <td> {item.RequestContent} </td> <td> {item.RequiredDate.ToDateString()} </td> <td> {item.PerformStatusString} </td> <td> {item.RequestStatusString} </td> <td> </td> </tr>"; stt++; } } txtBaoCaoTongHop.Text += $@"</tbody></table><p align ='right'><b>CHUYÊN VIÊN THEO DÕI</b></p> <br> <br> <br> <br> <br> <br> <br> <p align ='right'><b>{Sessions.User.FullName}</b></p>"; } }
public static void SetStaticData() { var resp = new DocumentServices().GetOrganizationList(); if (resp.Status) { StaticOrganization.organizations = resp.ResponseObject; } }
protected override void ShowObjectInformation() { item = DocumentServices.GetById(LongId); ViewState["CurrentObject"] = item; SoHieuVanBan.Text = item.DocumentCode; NguoiKy.SelectByValue(item.SignerID); NguoiSoanThao.SelectByValue(item.WriterID); NgayBanHanh.Text = item.ReleaseDate.ToDateString(); TrichYeu.Text = item.MainContent; LoaiVanBan.SelectByValue(item.DocumentCategoryID); }
protected override void GetDataList() { ExchangeDocServiceSoapClient client = new ExchangeDocServiceSoapClient(); client.Endpoint.Address = new EndpointAddress(AppSettings.HSCV_Service); BaseCollection = client.GetVBDiHasIdeaLeader(DateTime.Now.AddDays(-30), DateTime.Now) ?.Where(item => !string.IsNullOrEmpty(item.NguoiSoanThao) && item.NguoiSoanThao.ToUnsign().ToUpper().Equals(Sessions.DisplayName.ToUnsign().ToUpper())) ?.Where(item => DocumentServices.GetByVbdhCode(item.MaVBDi) == null) ?.ToList(); }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); MainForm mainForm = new MainForm(); new MainFormPresenter(mainForm); DocumentServices.RegisterCommands(); new EventsGenerator(); Application.Run(mainForm); }
protected override void SetDefaultValueOnCreate() { ChuyenVienTheoDoi.SelectByValue(Sessions.UserID); if (Parameters.Pid > 0) { LanhDaoYeuCau.SelectByValue(DocumentServices.GetById(Parameters.Pid)?.SignerID); } XacNhanHoanThanh.Checked = true; }
virtual public MpaAction CreateTranshipment(string input) { MpaAction action = new MpaAction { Message = input, Action = Actions.Transhipment, Environment = GetEnviromentType() }; Document doc = DocumentServices.CreateIrisWebLinkDocument(@"http://m.me/1008073892649026", input); ((WebLink)doc).PreviewType = new MediaType("image", "png"); ((WebLink)doc).PreviewUri = new Uri("http://s3-sa-east-1.amazonaws.com/i.imgtake.takenet.com.br/i7mur/i7mur.png"); action.Content = doc; return(action); }
/// <summary> /// Initializes a new instance of the <see cref="CodeRushProxy"/> class. /// </summary> public CodeRushProxy() { this.solution = GetNonNull(CodeRush.Solution, "CodeRush.Solution."); this.documents = GetNonNull(CodeRush.Documents, "CodeRush.Documents"); this.file = GetNonNull(CodeRush.File, "CodeRush.File"); this.textBuffers = GetNonNull(CodeRush.TextBuffers, "CodeRush.TextBuffers"); this.language = GetNonNull(CodeRush.Language, "CodeRush.Language"); this.markers = GetNonNull(CodeRush.Markers, "CodeRush.Markers"); var source = GetNonNull(CodeRush.Source, "CodeRush.Source"); this.source = new SourceModelProxy(source); this.undoStack = GetNonNull(CodeRush.UndoStack, "CodeRush.UndoStack"); }
public FormDocumentView(List <string> datos, long idDocument, string tipoDocumento) { _idDocument = idDocument; _datos = datos; _tipoDocumento = tipoDocumento; _documentServices = new DocumentServices(); _tesisServices = new TesisServices(); _bookServices = new BookServices(); _articleServices = new ArticleServices(); InitializeComponent(); CreateForm(); }
virtual public List <MpaAction> CreateCarrossel(string input) { List <MpaAction> mpaActions = new List <MpaAction>(); Document mediaResponse = DocumentServices.CreateMultimediaMenuDocument(input); Document[] docs = ((DocumentCollection)mediaResponse).Items; foreach (var doc in docs) { var docSelect = DocumentServices.CreateSelectDocument((DocumentSelect)doc); mpaActions.Add(new MpaAction { Action = Actions.Selection, Message = input, Content = docSelect, Environment = GetEnviromentType() }); } return(mpaActions); }
public FormInsert(List <string> datos, long idDocument, string tipoDocumento, List <Par> documentsParList) { _datos = datos; _idDocument = idDocument; _tipoDocumento = tipoDocumento; _updateForm = true; _urlPdfSelected = _datos[4]; _oldUrlPdfSelected = _datos[4]; _documentsParList = documentsParList; _documentServices = new DocumentServices(); _tesisServices = new TesisServices(); _bookServices = new BookServices(); _articleServices = new ArticleServices(); InitializeComponent(); FillFields(); }
protected override void CreateNewObject() { request = new Request { DocumentID = Parameters.Pid, RequestContent = NoiDungChiDao.Text.Trim(), RequiredDate = ThoiHan.Text.ToDateTime(), RequesterID = DocumentServices.GetById(Parameters.Pid).SignerID, RequesterName = DocumentServices.GetById(Parameters.Pid).SignerName }; RequestServices.Create(request, ChuyenVienTheoDoi.GetSelectedValues(), DonViThucHien.GetSelectedValues()); ExceptionlessClient.Default.SubmitEvent(new Event { Message = $"Nhập thông tin ykcd mới ({Sessions.DisplayName})", Type = "Nhập YKCD", Source = "YKCD_UBND" }); }
public static void GetVbdhCode() { ExchangeDocServiceSoapClient client = new ExchangeDocServiceSoapClient(); client.Endpoint.Address = new EndpointAddress(AppSettings.HSCV_Service); var documents = client.GetVBDiByDate(new DateTime(2018, 8, 20), new DateTime(2018, 12, 31))?.ToList(); foreach (var document in DocumentServices.GetList(fromDate: new DateTime(2018, 8, 20), toDate: new DateTime(2018, 12, 31))) { if (document.VBDHCode.IsNullOrEmpty()) { string documentCode = document.DocumentCode.Trim().ToUpper().Replace(" ", ""); document.VBDHCode = documents.Where(doc => doc != null && doc.SoKyHieu != null && doc.SoKyHieu.Trim().ToUpper().Equals(documentCode))?.FirstOrDefault()?.MaVBDi; DocumentServices.Update(document); } } }
protected void DocumentsItemCommand(object o, GridCommandEventArgs e) { if (e.CommandName == RadGrid.InitInsertCommandName) { e.Canceled = true; var i = new HRR.Core.Domain.Document(); i.ChangedBy = 0; i.Description = ""; i.IsPrivate = false; i.Path = ""; i.DateCreated = DateTime.Now; i.EnteredBy = 0; i.PersonID = 0; i.Title = ""; i.ID = 0; e.Item.OwnerTableView.InsertItem(i); } if (e.CommandName == RadGrid.PerformInsertCommandName) { var t = new HRR.Core.Domain.Document(); t.IsPrivate = (e.Item.FindControl("cbIsPrivate") as IdeaSeed.Web.UI.CheckBox).Checked; t.Title = (e.Item.FindControl("tbTitle") as IdeaSeed.Web.UI.TextBox).Text; t.Description = (e.Item.FindControl("tbDescription") as IdeaSeed.Web.UI.TextBox).Text; new DocumentServices().Save(t); IdeaSeed.Core.Data.NHibernate.NHibernateSessionManager.Instance.CloseSession(); } if (e.CommandName == RadGrid.UpdateCommandName) { if (e.Item is GridEditableItem) { var t = new DocumentServices().GetByID((int)e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["ID"]); t.IsPrivate = (e.Item.FindControl("cbIsPrivate") as IdeaSeed.Web.UI.CheckBox).Checked; t.Title = (e.Item.FindControl("tbTitle") as IdeaSeed.Web.UI.TextBox).Text; t.Description = (e.Item.FindControl("tbDescription") as IdeaSeed.Web.UI.TextBox).Text; new DocumentServices().Save(t); IdeaSeed.Core.Data.NHibernate.NHibernateSessionManager.Instance.CloseSession(); } } if (e.CommandName == RadGrid.DeleteCommandName) { var t = new DocumentServices().GetByID((int)e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["ID"]); new DocumentServices().Delete(t); } LoadDocuments(true); }