Esempio n. 1
0
        private void InitCombos()
        {
            UIHelper.ComboBoxInit("FileType", eFileGridEX.DropDowns["ddFileType"], AtMng.GetFile());
            UIHelper.ComboBoxInit("FileMetaType", eFileGridEX.DropDowns["ddMetaType"], AtMng.GetFile());
            UIHelper.ComboBoxInit("ReturnCode", eFileGridEX.DropDowns["ddCloseCode"], AtMng.GetFile());

            DataTable dt1 = AtMng.GetFile().Codes("Dim1");

            lmDatasets.appDB.ddLookupRow dlr1 = (lmDatasets.appDB.ddLookupRow)AtMng.DB.ddLookup.Select("LookupName='Dim1'")[0];
            eFileGridEX.RootTable.Columns["Dim1Id"].Caption       = dlr1["Description" + AtMng.AppMan.Language].ToString();
            eFileGridEX.DropDowns["ddDim1"].ValueMember           = dt1.PrimaryKey[0].ColumnName;
            eFileGridEX.DropDowns["ddDim1"].DisplayMember         = dt1.Columns[1].ColumnName;
            eFileGridEX.DropDowns["ddDim1"].Columns[0].DataMember = dt1.Columns[1].ColumnName;
            UIHelper.ComboBoxInit(dt1, eFileGridEX.DropDowns["ddDim1"], AtMng.GetFile());

            DataTable dt2 = AtMng.GetFile().Codes("Dim2");

            lmDatasets.appDB.ddLookupRow dlr2 = (lmDatasets.appDB.ddLookupRow)AtMng.DB.ddLookup.Select("LookupName='Dim2'")[0];
            eFileGridEX.RootTable.Columns["Dim2Id"].Caption       = dlr2["Description" + AtMng.AppMan.Language].ToString();
            eFileGridEX.DropDowns["ddDim2"].ValueMember           = dt2.PrimaryKey[0].ColumnName;
            eFileGridEX.DropDowns["ddDim2"].DisplayMember         = dt2.Columns[1].ColumnName;
            eFileGridEX.DropDowns["ddDim2"].Columns[0].DataMember = dt2.Columns[1].ColumnName;
            UIHelper.ComboBoxInit(dt2, eFileGridEX.DropDowns["ddDim2"], AtMng.GetFile());

            eFileGridEX.DropDowns["ddOffice"].SetDataBinding(AtMng.GetFile().Codes("OfficeList"), "");

            //DataTable dt3 = AtMng.GetFile().Codes("EfileLeadPL");
            //lmDatasets.appDB.ddLookupRow dlr3 = (lmDatasets.appDB.ddLookupRow)AtMng.DB.ddLookup.Select("LookupName='EfileLeadPL'")[0];
            //eFileGridEX.RootTable.Columns["LeadParaLegalCode"].Caption = dlr3["Description" + AtMng.AppMan.Language].ToString();
            //UIHelper.ComboBoxInit(dt3, eFileGridEX.DropDowns["ddOfficer"], AtMng.GetFile());

            DataTable dt3 = AtMng.GetFile().Codes("EfileLeadPL");

            lmDatasets.appDB.ddLookupRow dlr3 = (lmDatasets.appDB.ddLookupRow)AtMng.DB.ddLookup.Select("LookupName='EfileLeadPL'")[0];
            eFileGridEX.RootTable.Columns["LeadParaLegalCode"].Caption = dlr3["Description" + AtMng.AppMan.Language].ToString();
            eFileGridEX.DropDowns["ddOfficer"].ValueMember             = dlr3.PKName;// dt3.Columns[4].ColumnName;
            eFileGridEX.DropDowns["ddOfficer"].DisplayMember           = dt3.Columns[1].ColumnName;
            eFileGridEX.DropDowns["ddOfficer"].Columns[0].DataMember   = dt3.Columns[1].ColumnName;
            UIHelper.ComboBoxInit(dt3, eFileGridEX.DropDowns["ddOfficer"], AtMng.GetFile());

            DataTable dt5 = AtMng.GetFile().Codes("EfileOfficer");

            lmDatasets.appDB.ddLookupRow dlr5 = (lmDatasets.appDB.ddLookupRow)AtMng.DB.ddLookup.Select("LookupName='EfileOfficer'")[0];
            eFileGridEX.RootTable.Columns["OfficerId"].Caption        = dlr5["Description" + AtMng.AppMan.Language].ToString();
            eFileGridEX.DropDowns["ddOfficer1"].ValueMember           = dlr5.PKName;// dt5.Columns[4].ColumnName;
            eFileGridEX.DropDowns["ddOfficer1"].DisplayMember         = dt5.Columns[1].ColumnName;
            eFileGridEX.DropDowns["ddOfficer1"].Columns[0].DataMember = dt5.Columns[1].ColumnName;
            UIHelper.ComboBoxInit(dt5, eFileGridEX.DropDowns["ddOfficer1"], AtMng.GetFile());


            DataTable dt4 = AtMng.GetFile().Codes("EfileLeadLawyer");

            lmDatasets.appDB.ddLookupRow dlr4 = (lmDatasets.appDB.ddLookupRow)AtMng.DB.ddLookup.Select("LookupName='EfileLeadLawyer'")[0];
            eFileGridEX.RootTable.Columns["LeadLawyerId"].Caption = dlr4["Description" + AtMng.AppMan.Language].ToString();
            UIHelper.ComboBoxInit(dt4, eFileGridEX.DropDowns["ddLawyer"], AtMng.GetFile());
        }
Esempio n. 2
0
        private void uiCommandManager1_CommandClick(object sender, Janus.Windows.UI.CommandBars.CommandEventArgs e)
        {
            try
            {
                switch (e.Command.Key)
                {
                case "cmdDeleteItem":

                    break;

                case "cmdUndo":
                    Cancel();
                    break;

                case "cmdSave":
                    Save();
                    break;

                case "cmdNewLookup":
                    lmDatasets.appDB.ddLookupRow dtr = (lmDatasets.appDB.ddLookupRow)AtMng.GetddLookup().Add(null);
                    //ddTableGridEX.Find(ddTableGridEX.RootTable.Columns["TableName"], Janus.Windows.GridEX.ConditionOperator.Equal, "New Table", 0, 1);
                    //ddTableGridEX.CurrentColumn = ddTableGridEX.RootTable.Columns["TableName"];
                    //ddLookupGridEX.EditMode = Janus.Windows.GridEX.EditMode.EditOn;
                    break;

                case "cmdNewGeneric":
                    if (CurrentRowddLookup() != null)
                    {
                        lmDatasets.appDB.ddGenericRow dfr = (lmDatasets.appDB.ddGenericRow)AtMng.GetddGeneric().Add(CurrentRowddLookup());
                        //ddFieldGridEX.Find(ddTableGridEX.RootTable.Columns["FieldId"], Janus.Windows.GridEX.ConditionOperator.Equal, dfr.FieldId, 0, 1);
                        //ddFieldGridEX.CurrentColumn = ddTableGridEX.RootTable.ChildTables[0].Columns["FieldName"];
                        //ddFieldGridEX.EditMode = Janus.Windows.GridEX.EditMode.EditOn;
                    }
                    else
                    {
                        MessageBox.Show("Please select a valid row before choosing to create a new field", "No Table Selected", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    }
                    break;
                }
            }
            catch (Exception x)
            {
                UIHelper.HandleUIException(x);
            }
        }