Пример #1
0
        /// <summary>
        /// 로딩작업
        /// </summary>
        /// <param name="obj"></param>
        private void OnLoaded(object obj)
        {
            //throw new NotImplementedException();

            // 0.화면객체인스턴스화
            if (obj == null)
            {
                return;
            }
            var values = (object[])obj;

            splyDtlView = values[0] as SplyDtlView;
            cbHJD_CDE   = splyDtlView.cbHJD_CDE;
            btnBack     = splyDtlView.btnBack;
            btnDelete   = splyDtlView.btnDelete;
            btnSave     = splyDtlView.btnSave;
            btnDup      = splyDtlView.btnDup;


            //2.화면데이터객체 초기화
            InitDataBinding();


            //3.권한처리
            permissionApply();



            // 4.초기조회
            //DataTable dt = new DataTable();
            Hashtable param = new Hashtable();

            param.Add("sqlId", "SelectWttSplyMaDtl");
            param.Add("CNT_NUM", Dtl.CNT_NUM);

            Dtl = BizUtil.SelectObject(param) as SplyDtl;

            ////결과를 뷰모델멤버로 매칭
            //Type dbmodel = result.GetType();
            //Type model = this.GetType();

            ////모델프로퍼티 순회
            //foreach (PropertyInfo prop in model.GetProperties())
            //{
            //    string propName = prop.Name;
            //    //db프로퍼티 순회
            //    foreach (PropertyInfo dbprop in dbmodel.GetProperties())
            //    {
            //        string colName = dbprop.Name;
            //        var colValue = dbprop.GetValue(result, null);
            //        if (colName.Equals(propName))
            //        {
            //            try { prop.SetValue(this, colValue); } catch (Exception) { }
            //        }
            //    }
            //   //Console.WriteLine(propName + " - " + prop.GetValue(this,null));
            //}
        }
Пример #2
0
        /// 생성자
        public SplyDtlViewMdl(string CNT_NUM)
        {
            try
            {
                // 1.상세마스터
                Hashtable param = new Hashtable();
                param.Add("sqlId", "SelectWttSplyMaDtl");
                param.Add("CNT_NUM", CNT_NUM);

                Dtl = BizUtil.SelectObject(param) as SplyDtl;
            }
            catch (Exception) {}
        }