Esempio n. 1
0
        public void 고정자산등록Insert()
        {
            ClassLibrary.고정자산 고정자산 = new ClassLibrary.고정자산();
            고정자산.고정자산코드   = 고정자산dgv.CurrentRow.Cells[0].Value.ToString();
            고정자산.고정자산명    = 고정자산dgv.CurrentRow.Cells[1].Value.ToString();
            고정자산.계정과목코드번호 = 고정자산dgv.CurrentRow.Cells[2].Value.ToString();
            고정자산.취득일      = (DateTime)고정자산dgv.CurrentRow.Cells[3].Value;
            고정자산.처리여부     = 고정자산dgv.CurrentRow.Cells[4].Value.ToString();
            고정자산.취득원가     = int.Parse(txb취득원가.Text);
            고정자산.전기말상각누계액 = int.Parse(txb전기말상각누계액.Text);
            고정자산.상각방법     = cbb상각방법.Text;
            고정자산.내용연수     = int.Parse(txb내용연수.Text);
            고정자산.경비구분     = txb경비구분.Text;
            고정자산.취득수량     = int.Parse(txb취득수.Text);
            고정자산.일반상각비    = int.Parse(txb일반상각비.Text);
            고정자산.당기말상각누계액 = int.Parse(txb당기말상각누계액.Text);
            고정자산.입력일자     = (DateTime)dtp입력일자.Value;
            고정자산.수정일자     = (DateTime)dtp수정일자.Value;
            고정자산.구입처      = txb구입처명.Text;
            고정자산.제작사      = txb제작사명.Text;
            고정자산.규격       = int.Parse(txb규격.Text);
            고정자산.모델       = txb모델명.Text;
            고정자산.비고       = txb비고.Text;

            DB.고정자산.Insert(고정자산);
            MessageBox.Show("등록되었습니다.");
        }
Esempio n. 2
0
        public void 고정자산등록Update()
        {
            ClassLibrary.고정자산 고정자산 = new ClassLibrary.고정자산();

            DialogResult result = MessageBox.Show("변경 하시겠습니까?", "알림",
                                                  MessageBoxButtons.OKCancel, MessageBoxIcon.Information);

            if (result == DialogResult.OK)
            {
                고정자산.고정자산코드   = 고정자산dgv.CurrentRow.Cells[0].Value.ToString();
                고정자산.고정자산명    = 고정자산dgv.CurrentRow.Cells[1].Value.ToString();
                고정자산.계정과목코드번호 = 고정자산dgv.CurrentRow.Cells[2].Value.ToString();
                고정자산.취득일      = (DateTime)고정자산dgv.CurrentRow.Cells[3].Value;
                고정자산.처리여부     = 고정자산dgv.CurrentRow.Cells[4].Value.ToString();
                고정자산.취득원가     = int.Parse(txb취득원가.Text);
                고정자산.전기말상각누계액 = int.Parse(txb전기말상각누계액.Text);
                고정자산.상각방법     = cbb상각방법.Text;
                고정자산.내용연수     = int.Parse(txb내용연수.Text);
                고정자산.경비구분     = txb경비구분.Text;
                고정자산.취득수량     = int.Parse(txb취득수.Text);
                고정자산.일반상각비    = int.Parse(txb일반상각비.Text);
                고정자산.당기말상각누계액 = int.Parse(txb당기말상각누계액.Text);
                고정자산.입력일자     = (DateTime)dtp입력일자.Value;
                고정자산.수정일자     = (DateTime)dtp수정일자.Value;
                고정자산.구입처      = txb구입처명.Text;
                고정자산.제작사      = txb제작사명.Text;
                고정자산.규격       = int.Parse(txb규격.Text);
                고정자산.모델       = txb모델명.Text;
                고정자산.비고       = txb비고.Text;
                DB.고정자산.Update(고정자산);

                MessageBox.Show("변경하였습니다", "알림", MessageBoxButtons.OK, MessageBoxIcon.Information);
                고정자산bds.DataSource = DB.고정자산.GetAll();
            }
        }
Esempio n. 3
0
 private void 고정자산dgv_CellContentClick(object sender, DataGridViewCellEventArgs e)
 {
     ClassLibrary.고정자산 고정자산 = DB.고정자산.SearchCode(고정자산dgv.CurrentRow.Cells[0].Value.ToString());
     txb취득원가.Text     = 고정자산.취득원가.ToString();
     txb전기말상각누계액.Text = 고정자산.전기말상각누계액.ToString();
     cbb상각방법.Text     = 고정자산.상각방법;
     txb내용연수.Text     = 고정자산.내용연수.ToString();
     txb경비구분.Text     = 고정자산.경비구분;
     txb취득수.Text      = 고정자산.취득수량.ToString();
     txb일반상각비.Text    = 고정자산.일반상각비.ToString();
     txb당기말상각누계액.Text = 고정자산.당기말상각누계액.ToString();
     dtp입력일자.Value    = 고정자산.입력일자;
     dtp수정일자.Value    = 고정자산.수정일자;
     txb구입처명.Text     = 고정자산.구입처;
     txb제작사명.Text     = 고정자산.제작사;
     txb규격.Text       = 고정자산.규격.ToString();
     txb모델명.Text      = 고정자산.모델;
     txb비고.Text       = 고정자산.비고;
 }
Esempio n. 4
0
        public void 고정자산등록Delete()
        {
            ClassLibrary.고정자산 고정자산 = new ClassLibrary.고정자산();
            고정자산 = 고정자산dgv.CurrentRow.DataBoundItem as ClassLibrary.고정자산;

            if (고정자산 == null)
            {
                return;
            }

            DialogResult result = MessageBox.Show("삭제 하시겠습니까?", "알림",
                                                  MessageBoxButtons.OKCancel, MessageBoxIcon.Information);

            if (result == DialogResult.OK)
            {
                DB.고정자산.Delete(고정자산);
                MessageBox.Show("삭제하였습니다", "알림", MessageBoxButtons.OK, MessageBoxIcon.Information);
                고정자산bds.DataSource = DB.고정자산.GetAll();
            }
        }