public QueryDAOViewManagerSerializer(QueryBuilder qm)
        {
            this.qm_ = qm;

            this.viewManagerClassName_ = qm.ViewName_ + "_View_DAOManager";
            this.daoClassName_ = qm.ViewName_ + "_View_DAO";
            this.viewName_ = qm.ViewName_;
        }
 public QueryDAOTableManagerSerializer(QueryBuilder qm)
 {
     this.qm_ = qm;
     
     this.tableManagerClassName_ = qm.TableName_+ "_Table_DAOManager";
     this.daoClassName_ = qm.TableName_ + "_Table_DAO";
     this.tableName_ = qm.TableName_;
 }
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            if (this.queryTb_.Text == null || this.queryTb_.Text == "" || this.nameTB_.Text == "")
                return;

            //Table builder
            if (this.tableRB_.IsChecked == true)
            {
                //string path = @"D:\Project File\OTCDerivativesCalculatorModule\QuerySerializeCodeGenerator\QuerySerializer\baseCodeTemplate\view\sampleViewQuery\";
                //string sampleViewQuery = System.IO.File.ReadAllText(path + "sampleViewQuery.txt");

                //string query1 = Clipboard.GetText;

                string query = this.queryTb_.Text;

                QueryBuilder qm = new QueryBuilder(query);
                qm.TableName_ = this.nameTB_.Text;

                QueryDAOTableManagerSerializer qtm = new QueryDAOTableManagerSerializer(qm);
                QueryDAOTableSerializer qt = new QueryDAOTableSerializer(qm);
                ViewModelSerializer vms = new ViewModelSerializer(qm);
                ViewXamlSerializer vxs = new ViewXamlSerializer(qm);

                this.managerResultTb_.Text = qtm.build();
                this.daoTb_.Text = qt.build();
                this.ViewModelTb_.Text = vms.build();
                this.ViewTb_.Text = vxs.build();


                this.columnListGrid_.ItemsSource = qm.ColumnList_;

            }
            //View builder
            else if (this.viewRB_.IsChecked == true)
            {
                string query = this.queryTb_.Text;

                QueryBuilder qm = new QueryBuilder(query);
                qm.ViewName_ = this.nameTB_.Text;

                QueryDAOViewManagerSerializer qvm = new QueryDAOViewManagerSerializer(qm);
                QueryDAOViewSerializer qv = new QueryDAOViewSerializer(qm);
                ViewModelSerializer vms = new ViewModelSerializer(qm);
                ViewXamlSerializer vxs = new ViewXamlSerializer(qm);

                this.managerResultTb_.Text = qvm.build();
                this.daoTb_.Text = qv.build();
                this.ViewModelTb_.Text = vms.build();
                this.ViewTb_.Text = vxs.build();
            }
            else
            { 
            
            }
        }
 public ViewModelSerializer(QueryBuilder qm)
 {
     // TODO: Complete member initialization
     this.qm_ = qm;
 }
 public QueryDAOViewSerializer(QueryBuilder qm)
 {
     this.qm_ = qm;
     this.className_ = qm.ViewName_ + "_View_DAO";
     this.viewName_ = qm.ViewName_;
 }
 public QueryDAOTableSerializer(QueryBuilder qm)
 {
     this.qm_        = qm;
     this.className_ = qm.TableName_ + "_Table_DAO";
     this.tableName_ = qm.TableName_;
 }
Ejemplo n.º 7
0
 public ViewModelSerializer(QueryBuilder qm)
 {
     // TODO: Complete member initialization
     this.qm_ = qm;
 }
 public QueryDAOTableSerializer(QueryBuilder qm)
 {
     this.qm_ = qm;
     this.className_ = qm.TableName_ + "_Table_DAO";
     this.tableName_ = qm.TableName_;
 }