예제 #1
0
        private void Find_Doc()
        {
            string ls_sql = string.Format(
                @"Select * FROM bs_productline with(nolock) Where id='{0}' and state<>'2'
                  Select B.*,B.id as origin_id FROM bs_productline A with(nolock), bs_carton_code B with(nolock) 
                  Where A.id=B.location_id and A.id='{0}' and A.state<>'2' Order by B.location_id,B.id", txtID.Text);
            DataSet dts = clsApp.ExcuteSqlReturnDataSet(ls_sql, null);

            if (dts.Tables[0].Rows.Count > 0)
            {
                dtMostly = dts.Tables[0];
                if (dtMostly.Rows[0]["part_mrp"].ToString() == "True")
                {
                    chkpart_mrp.Checked = true;
                }
                else
                {
                    chkpart_mrp.Checked = false;
                }
                bds_h.DataSource = dtMostly;
                dtDetail         = dts.Tables[1];
                bds_d.DataSource = dtDetail;
                m_id             = txtID.Text;
            }
        }