예제 #1
0
        public static CDTForm Create(FormType formType, DataRow drTable)
        {
            CDTForm tmp = null;
            CDTData data;

            switch (formType)
            {
            case FormType.Detail:
                data = DataFactory.DataFactory.Create(DataType.Detail, drTable);
                tmp  = new FrmDetail(data);
                break;

            case FormType.MasterDetail:
                data = DataFactory.DataFactory.Create(DataType.MasterDetail, drTable);
                tmp  = new FrmMasterDetail(data);
                break;

            case FormType.Single:
                data = DataFactory.DataFactory.Create(DataType.Single, drTable);
                tmp  = new FrmSingle(data);
                break;
            }

            return(tmp);
        }
예제 #2
0
        public static CDTForm Create(FormType formType, CDTData data)
        {
            CDTForm tmp = null;

            switch (formType)
            {
            case FormType.Detail:
                tmp = new FrmDetail(data);
                break;

            case FormType.MasterDetail:
                tmp = new FrmMasterDetail(data);
                break;

            case FormType.Single:
                tmp = new FrmSingle(data);
                break;
            }

            return(tmp);
        }