Exemple #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:
                DateTime t1 = DateTime.Now;
                data = DataFactory.DataFactory.Create(DataType.MasterDetail, drTable);
                // ErrorManager.LogFile.AppendToFile("log.txt", (DateTime.Now - t1).TotalMilliseconds.ToString());
                t1  = DateTime.Now;
                tmp = new FrmMasterDetail(data);
                // ErrorManager.LogFile.AppendToFile("log.txt", (DateTime.Now - t1).TotalMilliseconds.ToString());
                break;

            case FormType.Single:
                data = DataFactory.DataFactory.Create(DataType.Single, drTable);
                tmp  = new FrmSingle(data);
                break;
            }
            // if (tmp != null) tmp.Text += "    " + drTable["TableName"].ToString();
            return(tmp);
        }
Exemple #2
0
        public static CDTForm Create(FormType formType, string sysTableID)
        {
            CDTForm tmp  = null;
            CDTData data = null;

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

                break;

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

                break;

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

                break;
            }
            //if (tmp != null) tmp.Text += "    " + data.DrTable["TableName"].ToString();
            return(tmp);
        }
Exemple #3
0
        public static CDTForm Create(FormType formType, string sysTableID)
        {
            CDTForm tmp = null;
            CDTData data;

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

                break;

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

                break;

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

                break;
            }

            return(tmp);
        }
Exemple #4
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;
            }
            // if (tmp != null) tmp.Text += "    " + data.DrTable["TableName"].ToString();
            return(tmp);
        }
Exemple #5
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);
        }