void ArchivesAddForm_Loaded(object sender, RoutedEventArgs e) { InitEvent(); //ctrFile.SystemName = "OA"; //ctrFile.ModelName = "Archives"; //ctrFile.InitBtn(Visibility.Visible, Visibility.Collapsed); //ctrFile.Event_AllFilesFinished += new EventHandler<FileCountEventArgs>(Event_AllFilesFinished); Utility.CbxItemBinder(comboxType, "RECORDTYPE", "0"); //_files = new FileCollection(_customParams, _maxUpload); //FileList.ItemsSource = _files; if (actions == Action.Edit || actions == Action.Read) { InitData(); //this.Loaded += new RoutedEventHandler(ArchivesAddForm_Loaded); //ctrFile.Load_fileData(archiveID); if (actions == Action.Read) { this.IsEnabled = false; } } else { Archives = new T_OA_ARCHIVES(); } }
void ArchivesAddForm_Loaded(object sender, RoutedEventArgs e) { InitEvent(); //ctrFile.SystemName = "OA"; //ctrFile.ModelName = "Archives"; //ctrFile.InitBtn(Visibility.Visible, Visibility.Collapsed); //ctrFile.Event_AllFilesFinished += new EventHandler<FileCountEventArgs>(Event_AllFilesFinished); Utility.CbxItemBinder(comboxType, "RECORDTYPE", "0"); //_files = new FileCollection(_customParams, _maxUpload); //FileList.ItemsSource = _files; if (actions == Action.Edit || actions == Action.Read) { InitData(); //this.Loaded += new RoutedEventHandler(ArchivesAddForm_Loaded); //ctrFile.Load_fileData(archiveID); if (actions == Action.Read) { this.IsEnabled = false; } } else { Archives = new T_OA_ARCHIVES(); } }
public T_OA_ARCHIVES GetLastArchives() { using (ArchivesManagementBll archivesBll = new ArchivesManagementBll()) { T_OA_ARCHIVES myArchives = archivesBll.GetLastArchives(); return(myArchives == null ? null : myArchives); } }
public T_OA_ARCHIVES GetArchivesById(string archivesID) { using (ArchivesManagementBll archivesBll = new ArchivesManagementBll()) { T_OA_ARCHIVES MyArchives = archivesBll.GetArchivesById(archivesID); return(MyArchives == null ? null : MyArchives); } }
void dgArchives_CurrentCellChanged(object sender, EventArgs e) { DataGrid grid = sender as DataGrid; if (grid.SelectedItem != null) { Archivestable = (T_OA_ARCHIVES)grid.SelectedItems[0];//获取当前选中的行数据并转换为对应的实体 } }
void dgArchives_SelectionChanged(object sender, SelectionChangedEventArgs e) { DataGrid grid = sender as DataGrid; if (grid.SelectedItems.Count == 0) return; if (grid.SelectedItems.Count > 0 ) { Archivestable = (T_OA_ARCHIVES)grid.SelectedItems[0];//获取当前选中的行数据并转换为对应的实体 } }
private void dgArchives_CurrentCellChanged(object sender, EventArgs e) { DataGrid grid = sender as DataGrid; if (grid.SelectedItem != null) { T_OA_ARCHIVES archives = (T_OA_ARCHIVES)grid.SelectedItems[0]; //returnValue = new searchItem(archives.COMPANYID, archives.ARCHIVESTITLE, archives.ARCHIVESID); returnValue = archives; } }
private void myChkBox_Checked(object sender, RoutedEventArgs e) { CheckBox chkbox = sender as CheckBox; if (chkbox.IsChecked.Value) { //archivesID.Add(chkbox.Tag.ToString()); T_OA_ARCHIVES archives = new T_OA_ARCHIVES(); archives = chkbox.DataContext as T_OA_ARCHIVES; dgArchives.SelectedItems.Add(archives); } }
//更新档案信息 public string UpdateArchives(T_OA_ARCHIVES archivesInfo) { using (ArchivesManagementBll archivesBll = new ArchivesManagementBll()) { string returnStr = ""; if (!archivesBll.UpdateArchives(archivesInfo)) { returnStr = "更新数据失败"; } return(returnStr); } }
void dgArchives_SelectionChanged(object sender, SelectionChangedEventArgs e) { DataGrid grid = sender as DataGrid; if (grid.SelectedItems.Count == 0) { return; } if (grid.SelectedItems.Count > 0) { Archivestable = (T_OA_ARCHIVES)grid.SelectedItems[0];//获取当前选中的行数据并转换为对应的实体 } }
private void myChkBox_Unchecked(object sender, RoutedEventArgs e) { CheckBox chkbox = sender as CheckBox; if (!chkbox.IsChecked.Value) { //archivesID.Remove(chkbox.Tag.ToString()); T_OA_ARCHIVES archives = new T_OA_ARCHIVES(); archives = chkbox.DataContext as T_OA_ARCHIVES; dgArchives.SelectedItems.Remove(archives); //CheckBox SelectBox = Utility.FindChildControl<CheckBox>(dgArchives, "SelectAll"); //if (SelectBox != null && SelectBox.IsChecked == true) //{ // SelectBox.IsChecked = false; //} GridHelper.SetUnCheckAll(dgArchives); } }
//新增档案信息 public string AddArchives(T_OA_ARCHIVES archivesInfo) { using (ArchivesManagementBll archivesBll = new ArchivesManagementBll()) { string returnStr = ""; if (!this.IsExistArchives(archivesInfo.ARCHIVESTITLE, archivesInfo.OWNERCOMPANYID)) { if (!archivesBll.AddArchives(archivesInfo)) { returnStr = "添加数据失败"; } } else { returnStr = "档案信息已经存在,添加数据失败"; } return returnStr; } }
//新增档案信息 public string AddArchives(T_OA_ARCHIVES archivesInfo) { using (ArchivesManagementBll archivesBll = new ArchivesManagementBll()) { string returnStr = ""; if (!this.IsExistArchives(archivesInfo.ARCHIVESTITLE, archivesInfo.OWNERCOMPANYID)) { if (!archivesBll.AddArchives(archivesInfo)) { returnStr = "添加数据失败"; } } else { returnStr = "档案信息已经存在,添加数据失败"; } return(returnStr); } }
void dgArchives_CurrentCellChanged(object sender, EventArgs e) { DataGrid grid = sender as DataGrid; if (grid.SelectedItem != null) { Archivestable = (T_OA_ARCHIVES)grid.SelectedItems[0];//获取当前选中的行数据并转换为对应的实体 } }
private void CancelButton_Click(object sender, RoutedEventArgs e) { returnValue = null; this.DialogResult = false; }
private void myChkBox_Checked(object sender, RoutedEventArgs e) { CheckBox chkbox = sender as CheckBox; if (chkbox.IsChecked.Value) { //archivesID.Add(chkbox.Tag.ToString()); T_OA_ARCHIVES archives = new T_OA_ARCHIVES(); archives = chkbox.DataContext as T_OA_ARCHIVES; dgArchives.SelectedItems.Add(archives); } }
private void myChkBox_Unchecked(object sender, RoutedEventArgs e) { CheckBox chkbox = sender as CheckBox; if (!chkbox.IsChecked.Value) { //archivesID.Remove(chkbox.Tag.ToString()); T_OA_ARCHIVES archives = new T_OA_ARCHIVES(); archives = chkbox.DataContext as T_OA_ARCHIVES; dgArchives.SelectedItems.Remove(archives); //CheckBox SelectBox = Utility.FindChildControl<CheckBox>(dgArchives, "SelectAll"); //if (SelectBox != null && SelectBox.IsChecked == true) //{ // SelectBox.IsChecked = false; //} GridHelper.SetUnCheckAll(dgArchives); } }
private void dgArchives_CurrentCellChanged(object sender, EventArgs e) { DataGrid grid = sender as DataGrid; if (grid.SelectedItem != null) { T_OA_ARCHIVES archives = (T_OA_ARCHIVES)grid.SelectedItems[0]; //returnValue = new searchItem(archives.COMPANYID, archives.ARCHIVESTITLE, archives.ARCHIVESID); returnValue = archives; } }
private void CancelButton_Click(object sender, RoutedEventArgs e) { returnValue = null; this.DialogResult = false; }
//更新档案信息 public string UpdateArchives(T_OA_ARCHIVES archivesInfo) { using (ArchivesManagementBll archivesBll = new ArchivesManagementBll()) { string returnStr = ""; if (!archivesBll.UpdateArchives(archivesInfo)) { returnStr = "更新数据失败"; } return returnStr; } }
private void DocTORecordBtn_Click(object sender, RoutedEventArgs e) { if (Companysenddoc != null) { try { SmtOADocumentAdminClient ArchivesClient = new SmtOADocumentAdminClient(); T_OA_ARCHIVES ArchiveT = new T_OA_ARCHIVES(); ArchiveT.ARCHIVESID = System.Guid.NewGuid().ToString(); ArchiveT.ARCHIVESTITLE = Companysenddoc.OACompanySendDoc.SENDDOCTITLE; ArchiveT.COMPANYID = Companysenddoc.OACompanySendDoc.CREATECOMPANYID; ArchiveT.CONTENT = Companysenddoc.OACompanySendDoc.CONTENT; ArchiveT.CREATEDATE = System.DateTime.Now; ArchiveT.RECORDTYPE = "SENDDOC"; ArchiveT.SOURCEFLAG = "0"; //自动导入 ArchiveT.CREATECOMPANYID = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID; ArchiveT.CREATEDEPARTMENTID = Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID; ArchiveT.CREATEPOSTID = Common.CurrentLoginUserInfo.UserPosts[0].PostID; ArchiveT.CREATEUSERID = Common.CurrentLoginUserInfo.EmployeeID; ArchiveT.CREATEUSERNAME = Common.CurrentLoginUserInfo.EmployeeName; ArchiveT.OWNERCOMPANYID = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID; ArchiveT.OWNERDEPARTMENTID = Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID; ArchiveT.OWNERID = Common.CurrentLoginUserInfo.EmployeeID; ArchiveT.OWNERNAME = Common.CurrentLoginUserInfo.EmployeeName; ArchiveT.OWNERPOSTID = Common.CurrentLoginUserInfo.UserPosts[0].PostID; ArchiveT.UPDATEDATE = null; ArchiveT.UPDATEUSERID = ""; ArchiveT.UPDATEUSERNAME = ""; T_OA_SENDDOC SendDocT = new T_OA_SENDDOC(); SendDocT = Companysenddoc.OACompanySendDoc; SendDocT.UPDATEDATE = System.DateTime.Now; //SendDocT.UPDATEUSERID = "1"; SendDocT.UPDATEUSERID = Common.CurrentLoginUserInfo.EmployeeID; SendDocT.UPDATEUSERNAME = Common.CurrentLoginUserInfo.EmployeeName; SendDocT.ISSAVE = "1"; tmpSendDoc = SendDocT; tmpSendDoc.T_OA_SENDDOCTYPE = Companysenddoc.doctype; ArchivesClient.AddArchivesCompleted += new EventHandler<AddArchivesCompletedEventArgs>(ArchivesClient_AddArchivesCompleted); ArchivesClient.AddArchivesAsync(ArchiveT); //SendDocClient.SendDocBatchDelAsync(DelInfosList); } catch (Exception ex) { //com.SelectionBox(Utility.GetResourceStr("DELETECONFIRM"), Utility.GetResourceStr("DELETEALTER"), SMT.SaaS.FrameworkUI.ChildWidow.ComfirmWindow.titlename, Result); } } else { ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "COMPANYDOC"), Utility.GetResourceStr("CONFIRMBUTTON")); } }