private void CodeTool_Load(object sender, EventArgs e) { // DataTable dt = new DataTable("Table_Scheme"); // dt.Columns.Add("Column0", System.Type.GetType("System.String")); // dt.Columns.Add("Column1", System.Type.GetType("System.Boolean")); //DataRow row = dt.NewRow(); //row["Column0"] = "ax"; //row["Column1"] = true; //dt.Rows.Add(row); List <CodeScheme> list = new List <CodeScheme>(); list = WcfServiceLocator.Create <ICodeSchemeManage>().findCodeScheme(); SystemManagementAndTools_CodeSchemeManage_CodeTool_CodeScheme_TreeList.DataSource = list; //加载编码规则中要选择的编码方案 SystemManagementAndTools_CodeSchemeManage_CodeTool_SelectCode_LookUpEdit.Properties.ShowFooter = false; SystemManagementAndTools_CodeSchemeManage_CodeTool_SelectCode_LookUpEdit.Properties.ShowHeader = false; SystemManagementAndTools_CodeSchemeManage_CodeTool_SelectCode_LookUpEdit.Properties.DisplayMember = "name"; SystemManagementAndTools_CodeSchemeManage_CodeTool_SelectCode_LookUpEdit.Properties.ValueMember = "id"; SystemManagementAndTools_CodeSchemeManage_CodeTool_SelectCode_LookUpEdit.Properties.DataSource = list; SystemManagementAndTools_CodeSchemeManage_CodeTool_SelectCode_LookUpEdit.ItemIndex = 0; SystemManagementAndTools_CodeSchemeManage_CodeTool_SelectCode_LookUpEdit.Properties.Columns.Add(new DevExpress.XtraEditors.Controls.LookUpColumnInfo("name", "ss")); //编码规则默认第一条 SystemManagementAndTools_CodeSchemeManage_CodeTool_RuleType_ComboBoxEdit.SelectedIndex = 0; SystemManagementAndTools_CodeSchemeManage_CodeTool_AdvancedSettings_SimpleButton.Visible = false; }
private void btnQuery_Click(object sender, EventArgs e) { Hashtable conditioin = new Hashtable(); List <ProjectBo> projects = WcfServiceLocator.Create <IProjectExportService>().getProjectsBySomeField(conditioin); gcProjectList.DataSource = projects; }
private void SystemManagementAndTools_CodeRuleSet_FillCommonCode_ModifiFillRuleCode_SimpleButton_Click(object sender, EventArgs e) { bool ok = true; ok = WcfServiceLocator.Create <ICodeDictionaryFill>().AddCodeDictionary(); MessageBox.Show(ok.ToString()); }
private void WriteEmail_Load(object sender, EventArgs e) { myTaskBoxService = WcfServiceLocator.Create <IMyTaskBoxService>(); if (State == 1) { teSender.Text = "陈小尼<*****@*****.**>;"; teAcceptor.Text = Email.Recipients + "<" + Email.Raddress + ">"; teTopic.Text = "回复:" + Email.Topic; memoEdit1.Text = Environment.NewLine + "发件人: " + Email.Sender + "<" + Email.Saddress + ">" + Environment.NewLine + "发送时间: " + Email.SendTime + Environment.NewLine + "收件人: " + Email.Recipients + "<" + Email.Raddress + ">" + Environment.NewLine + "主题: " + Email.Topic + Environment.NewLine + Email.Body; } if (State == 2) { teSender.Text = "陈小尼<*****@*****.**>;"; teTopic.Text = "转发:" + Email.Topic; memoEdit1.Text = Environment.NewLine + "发件人: " + Email.Sender + "<" + Email.Saddress + ">" + Environment.NewLine + "发送时间: " + Email.SendTime + Environment.NewLine + "收件人: " + Email.Recipients + "<" + Email.Raddress + ">" + Environment.NewLine + "主题: " + Email.Topic + Environment.NewLine + Email.Body; } }
private void SystemManagementAndTools_CodeRuleSet_FillGroupCode_ConfirmCodeValue_SimpleButton_Click(object sender, EventArgs e) { bool ok = true; ok = WcfServiceLocator.Create <ICodeSchemeManage>().AddCodeScheme(); MessageBox.Show(ok.ToString()); }
/// <summary> /// 页面加载 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void DocManageTool_Load(object sender, EventArgs e) { try { // 查询所有的文档和文档树 doclist = WcfServiceLocator.Create <IDocManageTool>().getAllDocument(); docTlist = WcfServiceLocator.Create <IDocManageTool>().getAllDocumentTree(); //构建文档树 TreeListBind(-1); // 剪切按钮不可用 this.pasteItem.Enabled = false; // 添加图片集合 System.Windows.Forms.ImageList imageListStreamer = new System.Windows.Forms.ImageList(); System.Drawing.Image image1 = View_Winform.DocManage.DocManageTool.DocManageRes.Calendar_16x16; System.Drawing.Image image2 = View_Winform.DocManage.DocManageTool.DocManageRes.Ribbon_Close_16x16; imageListStreamer.Images.Add(image1); imageListStreamer.Images.Add(image2); this.treeList1.ColumnsImageList = imageListStreamer; this.treeList1.SelectImageList = imageListStreamer; this.treeList1.StateImageList = imageListStreamer; } catch (Exception ex) { Console.WriteLine(ex.Message); } }
private void PersonnelTaskInquire_Load(object sender, EventArgs e) { List <GroupBo> groups = WcfServiceLocator.Create <IPersonnelTaskInquireService>().getAllUserGroups(); tlUserGroup.DataSource = groups; tlUserGroup.ParentFieldName = "ParentName"; tlUserGroup.KeyFieldName = "Name"; }
private void TaskResolve_Load(object sender, EventArgs e) { InputInformations = new List<InputInformationbo>(); var projectgroup = WcfServiceLocator.Create<IProjectPlanManageService>().getProjectGroupUsersByIdProjectId(projectid); var tasks = WcfServiceLocator.Create<IProjectPlanManageService>().getTasksByProjectId(projectid); gcProjectGroup.DataSource = projectgroup; gcTasks.DataSource = tasks; }
private void tlProjectType_Click(object sender, EventArgs e) { TreeListNode tlfocuse = tlProjectType.FocusedNode; int groupid = Convert.ToInt32(tlfocuse.GetDisplayText("Id")); List <ProjectBo> projects = WcfServiceLocator.Create <IProjectExportService>().getProjectsByGroupId(groupid); gcProjectList.DataSource = projects; }
private void MaterialReviewRuleManage_Load(object sender, EventArgs e) { IList <RepeatRule> r = new BindingList <RepeatRule>(); r = WcfServiceLocator.Create <IMaterialReviewRuleManage>().rep(); PartsMange_MaterialReviewRuleManage_MaterialReviewRuleManage_QueryValue_GridControl.DataSource = r; }
private void CheckResult_Load(object sender, EventArgs e) { IList <Material> list = new BindingList <Material>(); list = WcfServiceLocator.Create <ICheckResult>().GetMaterialcsMessage(); PartsMange_MaterialReviewRuleManage_CheckResult_Material_GridControl.DataSource = list; }
private void RoleList_Load(object sender, EventArgs e) { IList <Role> list = new BindingList <Role>(); list = WcfServiceLocator.Create <IRoleManage>().findRole(""); SystemManagementAndTools_RoleManage_RoleList_RoleListMessage_GridControl.DataSource = list; SystemManagementAndTools_RoleManage_RoleList_CommonPage_CommonTemplet.gridView = SystemManagementAndTools_RoleManage_RoleList_RoleListMessage_GridView; }
/// <summary> /// 应用到这个项目 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnApply_Click(object sender, EventArgs e) { ProjectCalendarBo projectcalendar = new ProjectCalendarBo(); projectcalendar.Week = week; projectcalendar.TimeSlot = worktimes; bool isSuccess = WcfServiceLocator.Create <IProjectCalendarService>().saveProjectCalendarByProjectId(projectcalendar, project.Id); }
/// <summary> /// 设置默认 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnDefault_Click(object sender, EventArgs e) { ProjectCalendarBo projectcalendar = new ProjectCalendarBo(); projectcalendar.Week = week; projectcalendar.TimeSlot = worktimes; projectcalendar.DateState = specialdate; bool isSuccess = WcfServiceLocator.Create <IProjectCalendarService>().setProjectCalendarToDefault(projectcalendar); }
private void btnQuery_Click(object sender, EventArgs e) { string name = txtQuery.Text.Trim(); List <GroupBo> groups = WcfServiceLocator.Create <IPersonnelTaskInquireService>().getUserGroupsByName(name); tlUserGroup.DataSource = groups; tlUserGroup.ParentFieldName = "ParentName"; tlUserGroup.KeyFieldName = "Name"; }
private void btnOK_Click(object sender, EventArgs e) { Product product = new Product(); product.Name = teProductName.Text.Trim(); product.Versions = teProjectVersion.Text.Trim(); WcfServiceLocator.Create <IProjectPlanManageService>().createProductDeploy(product); }
/// <summary> /// 模板加载 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void DocTemplateManage_Load(object sender, EventArgs e) { try { // 显示格式 UserLookAndFeel defaultLF = UserLookAndFeel.Default; defaultLF.UseWindowsXPTheme = false; defaultLF.Style = LookAndFeelStyle.Office2003; // // TemplateName // TemplateName.Caption = "名称"; TemplateName.FieldName = "Name"; TemplateName.ImageAlignment = System.Drawing.StringAlignment.Center; TemplateName.MinWidth = 49; TemplateName.Name = "Name"; TemplateName.OptionsColumn.AllowEdit = false; TemplateName.Visible = true; TemplateName.VisibleIndex = 0; // // TemplateIdId // TemplateId.Caption = "id"; TemplateId.FieldName = "Id"; TemplateId.ImageAlignment = System.Drawing.StringAlignment.Center; TemplateId.Name = "Id"; TemplateId.Visible = false; // // TemplateIdType // TemplateType.Caption = "id"; TemplateType.FieldName = "Id"; TemplateType.ImageAlignment = System.Drawing.StringAlignment.Center; TemplateType.Name = "Id"; TemplateType.Visible = false; this.TreeDocTemplate.treeList1.Columns.AddRange(new DevExpress.XtraTreeList.Columns.TreeListColumn[] { TemplateName }); this.TreeDocTemplate.treeList1.Columns.AddRange(new DevExpress.XtraTreeList.Columns.TreeListColumn[] { TemplateId }); this.TreeDocTemplate.treeList1.Columns.AddRange(new DevExpress.XtraTreeList.Columns.TreeListColumn[] { TemplateType }); // 查询所有的文档和文档树 docTemplateList = WcfServiceLocator.Create <IDocTemplateCategoryManage>().getAllDocumentTemplate(); docTemplateTreeList = WcfServiceLocator.Create <IDocTemplateCategoryManage>().getAllDocumentTemplateTree(); TreeListBind(-1); // 添加事件 this.TreeDocTemplate.treeList1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.treeList1_MouseDown); this.contextMenuStrip1.ItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.contextMenuStrip1_ItemClicked); this.contextMenuStrip2.ItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.contextMenuStrip2_ItemClicked); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void AddUnitGroup_Load(object sender, EventArgs e) { if (this.Tag == "Edit") { var unitGroup = WcfServiceLocator.Create <IMeasurementUnitBuild>().GetUnitGroupById(groupId); PartsMange_MeasurementUnitBuild_MeasurementUnitBuild_UnitGroupNumber_TextEdit.Text = unitGroup.number; PartsMange_MeasurementUnitBuild_MeasurementUnitBuild_UnitGroupName_TextEdit.Text = unitGroup.name; PartsMange_MeasurementUnitBuild_MeasurementUnitBuild_Description_TextEdit.Text = unitGroup.description; } }
private void HYPDM_Load(object sender, EventArgs e) { System.Threading.Thread.Sleep(10000); tlCategoryList.DataSource = WcfServiceLocator.Create <IHyPdmMainService>().getHuayanPdmMainMenu(); var imagelist = new ImageList(); imagelist.Images.Add(SystemIcon.GetFolderIcon(true).ToBitmap()); tlCategoryList.SelectImageList = imagelist; tlCategoryList.Nodes[0].ImageIndex = 0; }
private void PartsMange_MaterialReviewRuleManage_MaterialReviewRuleManage_Query_SimpleButton_Click(object sender, EventArgs e) { string name = PartsMange_MaterialReviewRuleManage_MaterialReviewRuleManage_RuleName_TextEdit.Tag.ToString(); //string is_strict = PartsMange_MaterialReviewRuleManage_MaterialReviewRuleManage_Creater_ButtonEdit.Tag.ToString(); string remark = PartsMange_MaterialReviewRuleManage_MaterialReviewRuleManage_RuleScope_ButtonEdit.Tag.ToString(); string is_strict = PartsMange_MaterialReviewRuleManage_MaterialReviewRuleManage_ReviewProperty_ButtonEdit.Tag.ToString(); PartsMange_MaterialReviewRuleManage_MaterialReviewRuleManage_QueryValue_GridControl.DataSource = WcfServiceLocator.Create <IMaterialReviewRuleManage>().QueryMaterialReviewRule(name, is_strict, remark); }
private void btnFindDesign_Click(object sender, EventArgs e) { var conditions = new Hashtable(); var sporadictask = WcfServiceLocator.Create <ISporadicTaskManageService>().getSporadicTaskBySomeConditions(conditions); groupControl8.Name = groupControl8.Name.Replace("{N}", sporadictask.Count.ToString()); gcDesignTask.DataSource = sporadictask; gcDesignTask.RefreshDataSource(); tlDesignTask.DataSource = WcfServiceLocator.Create <ISporadicTaskManageService>().getTaskTreeBySomeConditions(conditions); }
private void btnFindTechnology_Click(object sender, EventArgs e) { var conditions = new Hashtable(); var sporadictask = WcfServiceLocator.Create <ISporadicTaskManageService>().getSporadicTaskBySomeConditions(conditions); groupControl9.Name = groupControl9.Name.Replace("{N}", sporadictask.Count.ToString()); gcTechnology.DataSource = sporadictask; tlTechnology.DataSource = WcfServiceLocator.Create <ISporadicTaskManageService>().getTaskTreeBySomeConditions(conditions); xtraTabControl5.Width = 360; }
private void GanttChart_Load(object sender, EventArgs e) { List <TaskTree> tasktree = WcfServiceLocator.Create <IProjectPlanManageService>().getTaskTree(); tlTaskTree.DataSource = tasktree; tlTaskTree.ParentFieldName = "ParentName"; tlTaskTree.KeyFieldName = "Name"; tlTaskTree.ExpandAll(); DateTime[] projectDate = WcfServiceLocator.Create <IProjectPlanManageService>().getGanttCalendar(1); initGantt(tasktree, projectDate); }
public void GridViewCheck(DevExpress.XtraGrid.Views.Grid.GridView gridView, string p, int id) { if (p == "user") { List <Users> listRelated = new List <Users>(); listRelated = WcfServiceLocator.Create <IUsersManage>().FindRelatedUsersForUserGroup(id); //找出和指定用户组关联的用户 for (int i = 0; i < gridView.RowCount; i++) { var check = listRelated.Exists(delegate(Users user) { if (user.id == (int)gridView.GetRowCellValue(i, "id")) { return(true); } return(false); }); gridView.SetRowCellValue(i, "isChecked", check); } } if (p == "role") { List <Users> listRelated = new List <Users>(); listRelated = WcfServiceLocator.Create <IRoleManage>().findRelatedUser(id); //找出和指定角色关联的用户 for (int i = 0; i < gridView.RowCount; i++) { var check = listRelated.Exists(delegate(Users user) { if (user.id == (int)gridView.GetRowCellValue(i, "id")) { return(true); } return(false); }); gridView.SetRowCellValue(i, "isChecked", check); } } if (p == "rolewithgroup") { List <Group> listRelated = new List <Group>(); listRelated = WcfServiceLocator.Create <IRoleManage>().findRelatedGroup(id); //找出和指定角色关联的用户 for (int i = 0; i < gridView.RowCount; i++) { var check = listRelated.Exists(delegate(Group group) { if (group.Id == (int)gridView.GetRowCellValue(i, "Id")) { return(true); } return(false); }); gridView.SetRowCellValue(i, "isChecked", check); } } }
private void SystemManagementAndTools_RoleList_QueryRole_SimpleButton_Click(object sender, EventArgs e) { Role role = new Role(); role.Id = 1; role.name = "s"; bool ok = true; ok = WcfServiceLocator.Create <IRoleManage>().AddRole(role); MessageBox.Show(ok.ToString()); }
private void ProjectExport_Load(object sender, EventArgs e) { List <ProjectTypeBo> projectTypes = WcfServiceLocator.Create <IProjectExportService>().getAllProjectTypes(); tlProjectType.DataSource = projectTypes; tlProjectType.ParentFieldName = "ParentId"; tlProjectType.KeyFieldName = "Id"; List <ProjectBo> projects = WcfServiceLocator.Create <IProjectExportService>().getAllProjects(); gcProjectList.DataSource = projects; }
private void login_btn_Click(object sender, EventArgs e) { try { string name = WcfServiceLocator.Create <ITestService>().GetUser("zhuye", 28).Name; MessageBox.Show(name); } catch (Exception ex) { Console.WriteLine(ex.Message); } }
private void cal_Click(object sender, EventArgs e) { try { double name = WcfServiceLocator.Create <ITestService2>().Add2(2.2, 2.1); MessageBox.Show(name.ToString()); } catch (Exception ex) { Console.WriteLine(ex.Message); } }
/// <summary> /// 保存按钮单击事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void SystemManagementAndTools_UserGroupManage_Save_SimpleButton_Click(object sender, EventArgs e) { Group groupNew = new Group(); bool ok = false; groupNew.Name = SystemManagementAndTools_UserGroupManage_Name_TextEdit.Text; groupNew.Remark = SystemManagementAndTools_UserGroupManage_Describe_MemoEdit.Text; ok = WcfServiceLocator.Create <IUserGroupManage>().AddGroup(groupNew); MessageBox.Show(ok.ToString()); }
private void simpleButton1_Click(object sender, EventArgs e) { this.labelControl12.Text = "0"; document document = new document(); document.number = this.textEdit1.Text; document.version = this.textEdit2.Text; document.cn_name = this.textEdit3.Text; document.document_type_name = this.textEdit4.Text; document.create_user_name = this.buttonEdit1.Text; document.abstract_content = this.textEdit5.Text; document.key = this.textEdit6.Text; // 调用查询,查询数据集 List <document> list = WcfServiceLocator.Create <IDocGrantManage>().scanDocumentWithGrant(document); if (list == null) { this.labelControl12.Text = "0"; // 返回结果,绑定到datagrid this.gridControl1.DataSource = null; } else { if (checkEdit18.Checked) { gridColumn1.ColumnEdit = repositoryItemPictureEdit1; gridColumn1.FieldName = "format_pic"; System.Drawing.Image image1 = View_Winform.DocManage.DocManageTool.DocManageRes.Calendar_16x16; System.Drawing.Image image2 = View_Winform.DocManage.DocManageTool.DocManageRes.Ribbon_Close_16x16; for (int i = 0; i < list.Count; i++) { if ("txt".Equals(list[i].format_name)) { list[i].format_pic = ImageToByteArr(image1); } else { list[i].format_pic = ImageToByteArr(image2); } } } else { gridColumn1.ColumnEdit = null; gridColumn1.FieldName = "format_name"; } this.labelControl12.Text = list.Count.ToString(); // 返回结果,绑定到datagrid this.gridControl1.DataSource = list; } this.gridControl1.RefreshDataSource(); }