Example #1
0
        public static SamplingModel GetSampleById(Guid id)
        {
            DataRow       dr        = SQLHelper.getDataRow(ConnectionString, "GetSamplesById", id);
            SamplingModel sampleObj = new SamplingModel();

            Common.DataRow2Object(dr, sampleObj);
            return(sampleObj);
        }
Example #2
0
        public static SamplingModel GetSampleBySampleCode(string sampleCode)
        {
            DataRow       dr        = SQLHelper.getDataRow(ConnectionString, "GetSamplesBySampleCode", sampleCode);
            SamplingModel sampleObj = new SamplingModel();

            Common.DataRow2Object(dr, sampleObj);
            return(sampleObj);
        }
Example #3
0
        public static List <SamplingModel> GetSamples(Guid warehouseId, string TrackNo, string SampleCode, int status)
        {
            List <SamplingModel> sampleList = new List <SamplingModel>();
            DataTable            dt         = SQLHelper.getDataTable(ConnectionString, "GetSamples", warehouseId, SampleCode, status);

            foreach (DataRow dr in dt.Rows)
            {
                SamplingModel o = new SamplingModel();
                Common.DataRow2Object(dr, o);
                sampleList.Add(o);
            }
            return(sampleList);
        }