예제 #1
0
 private void cBResultType_SelectedIndexChanged(object sender, EventArgs e)
 {
     groupBox3.Controls.Clear();
     Singleton <Condition> .Instance.ResultType = (ResultType)Enum.Parse(typeof(ResultType), cBResultType.SelectedItem.ToString());
     if (Singleton <Condition> .Instance.ResultType == ResultType.Entity)
     {
         BuildEntity b = new BuildEntity();
         groupBox3.Controls.Add(b);
     }
     else if (Singleton <Condition> .Instance.ResultType == ResultType.Proc)
     {
         BuildProc b = new BuildProc();
         groupBox3.Controls.Add(b);
     }
     else if (Singleton <Condition> .Instance.ResultType == ResultType.DAL)
     {
         BuildDALandBLL b = new BuildDALandBLL();
         groupBox3.Controls.Add(b);
     }
 }
예제 #2
0
        private void Form1_Load(object sender, EventArgs e)
        {
            Keys = ConfigurationManager.AppSettings.AllKeys;
            foreach (string Key in Keys)
            {
                cBDataSource.Items.Add(Key);
            }
            string Value = ConfigurationManager.AppSettings[Keys[0]];

            string[] values = Value.Split(';');
            Singleton <ConnectionString> .Instance.DataSource = values[0];
            Singleton <ConnectionString> .Instance.UserID     = values[1];
            Singleton <ConnectionString> .Instance.PassWord   = values[2];
            tBUserName.Text            = values[1].Split('=')[1];
            tBPW.Text                  = values[2].Split('=')[1];
            cBDataSource.SelectedIndex = 0;
            List <string> DLLName = Enum.GetNames(typeof(DLLName)).ToList();

            foreach (string name in DLLName)
            {
                cBDLLName.Items.Add(name);
            }
            cBDLLName.SelectedIndex = 0;
            List <string> ResultType = Enum.GetNames(typeof(ResultType)).ToList();

            foreach (string result in ResultType)
            {
                cBResultType.Items.Add(result);
            }
            cBResultType.SelectedIndex = 0;
            groupBox3.Controls.Clear();
            BuildEntity be = new BuildEntity();

            groupBox3.Controls.Add(be);

            Singleton <Condition> .Instance.ALLParameters     = new  List <OriginalParameter>();
            Singleton <Condition> .Instance.FinalParameters   = new List <FinalParameter>();
            Singleton <Condition> .Instance.ChoosenParameters = new List <string>();

            //Singleton<Condition>.Instance.CreatedParameters = new List<string>();
            //Singleton<Condition>.Instance.FCreatedParameters = new List<string[]>();
            //Singleton<Condition>.Instance.AllCreatedParameterNames = new List<string>();

            //Singleton<Condition>.Instance.UpdatedParameters = new List<string>();
            //Singleton<Condition>.Instance.FUpdatedParameters = new List<string[]>();
            //Singleton<Condition>.Instance.AllUpdatedParameterNames = new List<string>();

            //Singleton<Condition>.Instance.AuditedParameters = new List<string>();
            //Singleton<Condition>.Instance.FAuditedParameters = new List<string[]>();
            //Singleton<Condition>.Instance.AllAuditedParameterNames = new List<string>();

            //Singleton<Condition>.Instance.DeletedParameters = new List<string>();
            //Singleton<Condition>.Instance.FDeletedParameters = new List<string[]>();
            //Singleton<Condition>.Instance.AllDeletedParameterNames = new List<string>();


            //Singleton<Condition>.Instance.All.type = Type.All;
            //Singleton<Condition>.Instance.Create.type = Type.Create;
            //Singleton<Condition>.Instance.Update.type = Type.Update;
            //Singleton<Condition>.Instance.Delete.type = Type.Delete;
            //Singleton<Condition>.Instance.Audit.type = Type.Audit;
        }