Beispiel #1
0
        /// <summary>
        ///  Class 폼 로드시
        /// 1. DataGridView에 Column 추가
        /// 2. SetData()호출 => LoadClassData() 호출
        /// 3. DB에 있는 LoadClassData()에서 Binding 할 Data 가져오기
        /// 4. ComboBox에 공통코드(LessonType) 추가
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void frmClass_Load(object sender, EventArgs e)
        {
            try
            {
                CommonUtil.SetInitGridView(classDataGridView);
                CommonUtil.AddGridTextColumn(classDataGridView, "강의", "lessonCode", 50);                   //index[0]
                CommonUtil.AddGridTextColumn(classDataGridView, "강의명", "lessonName", 80);                  //1
                CommonUtil.AddGridTextColumn(classDataGridView, "클래스", "classDistribution", 60);           //2
                CommonUtil.AddGridTextColumn(classDataGridView, "직원ID", "staffID", 70);                    //3
                CommonUtil.AddGridTextColumn(classDataGridView, "강의 시작일", "lessonStartDate", 100);         //4
                CommonUtil.AddGridTextColumn(classDataGridView, "강의 종료일", "lessonEndDate", 100);           //5
                CommonUtil.AddGridTextColumn(classDataGridView, "강의 시작시간", "lessonStartTime", 100);        //6
                CommonUtil.AddGridTextColumn(classDataGridView, "강의 종료시간", "lessonEndTime", 100);          //7
                CommonUtil.AddGridTextColumn(classDataGridView, "강의료", "lessonAmount", 100);               //8
                CommonUtil.AddGridTextColumn(classDataGridView, "특이사항", "lessonNsReport", 10, false);      //9
                this.classDataGridView.Font = new Font("나눔바른고딕", 10, FontStyle.Regular);

                SetData();

                string[] codes = { "LessonType" };
                MemberDB db    = new MemberDB();
                DataSet  ds    = db.GetCommonCode(codes);

                CommonUtil.BindingComboBox(comboBox1, ds.Tables["LessonType"], "Code", "Name");
                CommonUtil.BindingComboBox(cbClass, ds.Tables["LessonType"], "Code", "Name");
                SetMemberText st = new SetMemberText(comboBox1.Text);
            }
            catch (Exception err)
            {
                MessageBox.Show(err.Message);
            }
        }
Beispiel #2
0
        private void frmMembership_Load(object sender, EventArgs e)
        {
            string[] codes = { "JOB" };
            MemberDB db    = new MemberDB();
            DataSet  ds    = db.GetCommonCode(codes);

            CommonUtil.BindingComboBox(cboJob, ds.Tables["JOB"], "Code", "Name");
            SetMemberText st = new SetMemberText(cboJob.Text);
        }
Beispiel #3
0
        /// <summary>
        ///  Attendance_Load 폼 로드시
        /// 1. DataGridView에 Column 추가
        /// 2. SetData()호출 => LoadCounselingData() 호출
        /// 3. DB에 있는 LoadCounselingData()에서 Binding 할 Data 가져오기
        /// 4. 공통 코드 가져오는 메서드 GetCommonCode()
        /// 5. BindingComboBox()로 콤보박스에 공통코드 바인딩
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void frnAttendance_Load(object sender, EventArgs e)
        {
            try
            {
                DataGridViewCheckBoxColumn col = new DataGridViewCheckBoxColumn();
                col.Name       = "chk";
                col.HeaderText = "";
                col.Width      = 30;
                AttDataGridView.Columns.Add(col);

                Point headerCellLocation = AttDataGridView.GetCellDisplayRectangle(0, -1, true).Location;
                //헤더부분의 체크박스
                headerCheckBox.Location  = new Point(headerCellLocation.X + 8, headerCellLocation.Y + 2);
                headerCheckBox.Size      = new Size(18, 18);
                headerCheckBox.BackColor = Color.Transparent;
                headerCheckBox.Click    += HeaderCheckBox_Click;
                AttDataGridView.Controls.Add(headerCheckBox); //3

                CommonUtil.SetInitGridView(AttDataGridView);
                CommonUtil.AddGridTextColumn(AttDataGridView, "출결 번호", "attendanceNum", 70, false);      //index[1]
                CommonUtil.AddGridTextColumn(AttDataGridView, "학생ID", "stuID", 65);                      //index[2]
                CommonUtil.AddGridTextColumn(AttDataGridView, "이름", "stuName", 65);                      //3
                CommonUtil.AddGridTextColumn(AttDataGridView, "강의코드", "lessonCode", 70);                 //4
                CommonUtil.AddGridTextColumn(AttDataGridView, "출결날짜", "attendanceDate", 100);            //5
                CommonUtil.AddGridTextColumn(AttDataGridView, "입실 시간", "enteringTime", 100);             //6
                CommonUtil.AddGridTextColumn(AttDataGridView, "퇴실 시간", "entranceTime", 100);             //7
                CommonUtil.AddGridTextColumn(AttDataGridView, "지각 여부", "lateness", 75);                  //8
                CommonUtil.AddGridTextColumn(AttDataGridView, "결석 여부", "absence", 75);                   //9
                CommonUtil.AddGridTextColumn(AttDataGridView, "조퇴 여부", "early_Leave", 75);               //10
                CommonUtil.AddGridTextColumn(AttDataGridView, "기록사항", "recordContent", 10, false);       //11

                this.AttDataGridView.Font = new Font("나눔바른고딕", 10, FontStyle.Regular);

                SetData();

                string[] codes = { "LessonType" };
                MemberDB db    = new MemberDB();
                DataSet  ds    = db.GetCommonCode(codes);

                CommonUtil.BindingComboBox(comboBox1, ds.Tables["LessonType"], "lessonCode", "Code");
                SetMemberText st = new SetMemberText(comboBox1.Text);
            }
            catch (Exception err)
            {
                throw err;
            }
        }
Beispiel #4
0
        /// <summary>
        /// Member 폼 로드시
        /// 1. DataGridView에 Column 추가
        /// 2. SetData()호출 => LoadMemberData() 호출
        /// 3. DB에 있는 LoadMemberData()에서 Binding 할 Data 가져오기
        /// 4. ComboBox에 공통코드(ClassType) 추가
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void frmMember_Load(object sender, EventArgs e)
        {
            try
            {
                CommonUtil.SetInitGridView(memberDataGridView);
                CommonUtil.AddGridTextColumn(memberDataGridView, "학생ID", "stuID", 100);              //index[0]
                CommonUtil.AddGridTextColumn(memberDataGridView, "이름", "stuName", 100);              //1
                CommonUtil.AddGridTextColumn(memberDataGridView, "번호", "phNum", 170);                //2
                CommonUtil.AddGridTextColumn(memberDataGridView, "학교", "school", 120);               //3
                CommonUtil.AddGridTextColumn(memberDataGridView, "학년", "class", 80);                 //4
                CommonUtil.AddGridTextColumn(memberDataGridView, "수강코드", "lessonCode", 170);         //5
                CommonUtil.AddGridTextColumn(memberDataGridView, "성별", "stuGender", 10, false);      //6
                CommonUtil.AddGridTextColumn(memberDataGridView, "우편번호", "postalCode", 10, false);   //7
                CommonUtil.AddGridTextColumn(memberDataGridView, "기본주소", "priAddress", 10, false);   //8
                CommonUtil.AddGridTextColumn(memberDataGridView, "상세주소", "detAddress", 10, false);   //9
                CommonUtil.AddGridTextColumn(memberDataGridView, "생년월일", "birth", 10, false);        //10
                CommonUtil.AddGridTextColumn(memberDataGridView, "수강등록일", "regDate", 10, false);     //11
                CommonUtil.AddGridTextColumn(memberDataGridView, "보호자번호", "pPNum", 10, false);       //12
                CommonUtil.AddGridTextColumn(memberDataGridView, "특이사항", "nsReport", 10, false);     //13
                CommonUtil.AddGridTextColumn(memberDataGridView, "삭제여부", "deleted", 10, false);      //14
                CommonUtil.AddGridTextColumn(memberDataGridView, "선행여부", "antecedent", 10, false);   //15
                CommonUtil.AddGridTextColumn(memberDataGridView, "학생사진", "stuPic", 10, false);       //16
                this.memberDataGridView.Font = new Font("나눔바른고딕", 10, FontStyle.Regular);

                SetData();

                string[] codes = { "ClassType" };
                MemberDB db    = new MemberDB();
                DataSet  ds    = db.GetCommonCode(codes);

                CommonUtil.BindingComboBox(comboBox1, ds.Tables["ClassType"], "lessonCode", "Name");
                SetMemberText st = new SetMemberText(comboBox1.Text);
            }
            catch (Exception err)
            {
                MessageBox.Show(err.Message);
            }
        }