예제 #1
0
        public DeliveryVoucher(string voucher_no)
        {
            DataView dv;
            dv = DBHelper.createDataset(string.Format("select * from jp_jjd where jjd_no = '{0}'", voucher_no)).Tables[0].DefaultView;
            if (dv.Count > 0)
            {
                m_delivery_voucher_no = dv[0]["jjd_no"].ToString();
                m_receiver = dv[0]["receiver"].ToString();
                m_receive_date = dv[0]["receiver_date"].ToString();
                m_receive_place = dv[0]["receiver_place"].ToString();
                m_location = dv[0]["location"].ToString();

                dv = DBHelper.createDataset(string.Format("select * from jp_jjd_line where jjd_no ='{0}'", voucher_no)).Tables[0].DefaultView;
                for (int i = 0; i < dv.Count; i++)
                {
                    m_delievery_voucher_lines[i] = new DeliveryVoucherLine();
                    m_delievery_voucher_lines[i].JjdNo = voucher_no;
                    m_delievery_voucher_lines[i].LocationGrid = dv[i]["location_grid"].ToString();
                    m_delievery_voucher_lines[i].MatrSeqNo = dv[i]["matr_seq_no"].ToString();
                    m_delievery_voucher_lines[i].PartDescription = dv[i]["part_description"].ToString();
                    m_delievery_voucher_lines[i].PartNo = dv[i]["part_no"].ToString();
                    m_delievery_voucher_lines[i].PartUnit = dv[i]["part_unit"].ToString();
                    m_delievery_voucher_lines[i].ProjectId = dv[i]["project_id"].ToString();
                    m_delievery_voucher_lines[i].Qty = dv[i]["qty"].ToString();
                    m_delievery_voucher_lines[i].Remark = dv[i]["remark"].ToString();
                    m_delievery_voucher_lines[i].RequisitionId = dv[i]["requisition"].ToString();
                    m_delievery_voucher_lines[i].Rowstate = dv[i]["rowstate"].ToString();
                    m_delievery_voucher_lines[i].Rowversion = dv[i]["rowversion"].ToString();
                }
            }
        }
        public DeliveryVoucher(string voucher_no)
        {
            DataView dv;

            dv = DBHelper.createDataset(string.Format("select * from jp_jjd where jjd_no = '{0}'", voucher_no)).Tables[0].DefaultView;
            if (dv.Count > 0)
            {
                m_delivery_voucher_no = dv[0]["jjd_no"].ToString();
                m_receiver            = dv[0]["receiver"].ToString();
                m_receive_date        = dv[0]["receiver_date"].ToString();
                m_receive_place       = dv[0]["receiver_place"].ToString();
                m_location            = dv[0]["location"].ToString();

                dv = DBHelper.createDataset(string.Format("select * from jp_jjd_line where jjd_no ='{0}'", voucher_no)).Tables[0].DefaultView;
                for (int i = 0; i < dv.Count; i++)
                {
                    m_delievery_voucher_lines[i]                 = new DeliveryVoucherLine();
                    m_delievery_voucher_lines[i].JjdNo           = voucher_no;
                    m_delievery_voucher_lines[i].LocationGrid    = dv[i]["location_grid"].ToString();
                    m_delievery_voucher_lines[i].MatrSeqNo       = dv[i]["matr_seq_no"].ToString();
                    m_delievery_voucher_lines[i].PartDescription = dv[i]["part_description"].ToString();
                    m_delievery_voucher_lines[i].PartNo          = dv[i]["part_no"].ToString();
                    m_delievery_voucher_lines[i].PartUnit        = dv[i]["part_unit"].ToString();
                    m_delievery_voucher_lines[i].ProjectId       = dv[i]["project_id"].ToString();
                    m_delievery_voucher_lines[i].Qty             = dv[i]["qty"].ToString();
                    m_delievery_voucher_lines[i].Remark          = dv[i]["remark"].ToString();
                    m_delievery_voucher_lines[i].RequisitionId   = dv[i]["requisition"].ToString();
                    m_delievery_voucher_lines[i].Rowstate        = dv[i]["rowstate"].ToString();
                    m_delievery_voucher_lines[i].Rowversion      = dv[i]["rowversion"].ToString();
                }
            }
        }