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); }
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); }
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); }
private void simpleButtonFormReport_Click(object sender, EventArgs e) { Config.NewKeyValue("sysReportID", _data.DrTable["sysReportID"]); CDTData data = (_data as DataReport).GetFormForReport(); CDTForm frm = FormFactory.Create(FormType.Single, data); frm.ShowDialog(); }
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); }
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); }