public void InitLegend(atriumBE.FileManager fm) { FM = fm; //get all roles and contact types with colors defined DataTable gRoles = FM.Codes("RoleCode"); DataTable fRoles = FM.Codes("ContactType"); dtRoleLegend = new DataTable(); dtRoleLegend.Columns.Add("Type", typeof(string)); dtRoleLegend.Columns.Add("Description", typeof(string)); dtRoleLegend.Columns.Add("Color", typeof(string)); foreach (DataRow dr in gRoles.Rows) { if (!dr.IsNull("WFBGColor") && dr["WFBGColor"].ToString() != "0") { dtRoleLegend.Rows.Add("G", dr["RoleEng"].ToString(), dr["WFBGColor"].ToString()); } } foreach (DataRow dr in fRoles.Rows) { if (!dr.IsNull("WFBGColor") && dr["WFBGColor"].ToString() != "0") { dtRoleLegend.Rows.Add("F", dr["ContactTypeDescEng"].ToString(), dr["WFBGColor"].ToString()); } } gridExRoleLegend.DataSource = dtRoleLegend; gridExRoleLegend.DataMember = ""; UIHelper.SetDataTableAsGridDataSource(gridExRoleLegend, dtRoleLegend); }
private void fTemplates_Load(object sender, EventArgs e) { myFM = AtMng.GetTemplate().FM; myDM = myFM.GetDocMng(); ucDoc1.Init(myDM); UIHelper.ComboBoxInit(myFM.Codes("vDocType"), mccCommType, myFM); UIHelper.ComboBoxInit(myFM.Codes("TemplateLayoutStyle"), mccLayoutStyle, myFM); templateBindingSource.DataSource = AtMng.DB; templateBindingSource.CurrentChanged += new EventHandler(templateBindingSource_CurrentChanged); templateBindingSource.ResetBindings(false); templateGridEX.MoveFirst(); cmdInsertTag.Enabled = Janus.Windows.UI.InheritableBoolean.False; }
public fOfficeToJudicialDistrict(Form f) : base(f) { InitializeComponent(); AtMng.OfficeMng.GetOffice2JD().Load(); atriumBE.FileManager FM = AtMng.GetFile(); //office2JDGridEX.DropDowns["ddOffice"].SetDataBinding(FM.Codes("vofficelist"),""); //mccOfficeId.SetDataBinding(FM.Codes("vofficelist"), ""); UIHelper.ComboBoxInit(FM.Codes("vofficelist"), office2JDGridEX.DropDowns["ddOffice"], FM); UIHelper.ComboBoxInit(FM.Codes("province"), office2JDGridEX.DropDowns["ddProvinceDescription"], FM); UIHelper.ComboBoxInit(FM.Codes("vofficelist"), mccOfficeId, FM); UIHelper.ComboBoxInit(FM.Codes("province"), mccProvinceCode, FM); //FM.Dispose(); office2JDBindingSource.DataSource = AtMng.OfficeMng.DB; office2JDBindingSource.DataMember = AtMng.OfficeMng.DB.Office2JD.TableName; }
public fBFCode(Form f) : base(f) { InitializeComponent(); ucBFCode1.AtMng = AtMng; aCBFBindingSource.DataMember = AtMng.acMng.DB.ACBF.ToString(); aCBFBindingSource.DataSource = AtMng.acMng.DB; atriumBE.FileManager FM = AtMng.GetFile(); aCBFGridEX.DropDowns["ddBFType"].SetDataBinding(FM.Codes("BFType"), ""); aCBFGridEX.DropDowns["ddRoleCode"].SetDataBinding(FM.AtMng.GetGeneralRec("select * from vRoleuContactType where obsolete=0"), ""); FM.Dispose(); int id = CurrentRow().ACBFId; ucBFCode1.DataSource = new DataView(AtMng.acMng.DB.ACBF, "ACBFId=" + id.ToString(), "", DataViewRowState.CurrentRows); }
private void fPLOffice_Load(object sender, EventArgs e) { AtMng.GetPLOffice().Load(); pLOfficeBindingSource.DataSource = AtMng.DB; atriumBE.FileManager FM = AtMng.GetFile(); pLOfficeGridEX.DropDowns["ddContactType"].SetDataBinding(FM.Codes("ContactType"), ""); pLOfficeGridEX.DropDowns["ddFileType"].SetDataBinding(FM.Codes("FileType"), ""); pLOfficeGridEX.DropDowns["ddStatus"].SetDataBinding(FM.Codes("Status"), ""); pLOfficeGridEX.DropDowns["ddOffice"].SetDataBinding(FM.Codes("vOfficeList"), ""); pLOfficeGridEX.DropDowns["ddOfficer"].SetDataBinding(FM.Codes("vOfficerList"), ""); pLOfficeGridEX.DropDowns["ddOfficeType"].SetDataBinding(FM.Codes("OfficeType"), ""); pLOfficeGridEX.MoveFirst(); }