Ejemplo n.º 1
0
        public List <ManagementCheckList> GetManagementCheckLists()
        {
            List <ManagementCheckList> managementCheckLists = new List <ManagementCheckList>();
            SqlCommand Selectcommand = GetSqlCommand();

            oasisconnectionString.Open();
            int counter = 0;

            using (SqlDataReader rd = Selectcommand.ExecuteReader())
            {
                while (rd.Read())
                {
                    ManagementCheckList checkList = new ManagementCheckList();
                    checkList.Id = Convert.ToInt32(rd["Id"]);

                    checkList.date                      = Convert.ToDateTime(rd["date"]);
                    checkList.TDs_clean                 = Convert.ToDecimal(rd["TDs_clean"]);
                    checkList.TDs_Main                  = Convert.ToDecimal(rd["TDs_Main"]);
                    checkList.Ozone                     = rd["Ozone"].ToString();
                    checkList.Silcone_Crystal_Color     = rd["Silcone_Crystal_Color"].ToString();
                    checkList.Mun_Tank_level            = Convert.ToDecimal(rd["Mun_Tank_level"]);
                    checkList.Clean_tank_level          = Convert.ToDecimal(rd["Clean_tank_level"]);
                    checkList._1_PF_10_Micron           = Convert.ToDecimal(rd["_1_PF_10_Micron"]);
                    checkList._2_PF_5_Micron            = Convert.ToDecimal(rd["_2_PF_5_Micron"]);
                    checkList._3_Sand_Filter            = Convert.ToDecimal(rd["_3_Sand_Filter"]);
                    checkList._4_Softner                = Convert.ToDecimal(rd["_4_Softner"]);
                    checkList._5_1_Micron_Preasure      = Convert.ToDecimal(rd["_5_1_Micron_Preasure"]);
                    checkList._6_Membrane_Preasure      = Convert.ToDecimal(rd["_6_Membrane_Preasure"]);
                    checkList._7_Flow_Rate_RAW          = Convert.ToDecimal(rd["_7_Flow_Rate_RAW"]);
                    checkList._8_Flow_Rate_Clean        = rd["_8_Flow_Rate_Clean"].ToString();
                    checkList._9_Pump_Functional        = rd["_9_Pump_Functional"].ToString();
                    checkList.Conductive                = Convert.ToDecimal(rd["Conductive"]);
                    checkList.Clean_Water_Meter_Reading = Convert.ToDecimal(rd["Clean_Water_Meter_Reading"]);
                    checkList.Litres_Purified_Since_Previous_Reading = Convert.ToDecimal(rd["Litres_Purified_Since_Previous_Reading"]);
                    checkList.CheckListType = rd["CheckListType"].ToString();
                    managementCheckLists.Add(checkList);

                    counter += 1;
                }
            }

            oasisconnectionString.Close();
            return(managementCheckLists);
        }
Ejemplo n.º 2
0
        //my constructors
        public CheckList(ManagementCheckList Item, string key)

        {
            this.Item = Item;
            this.key  = key;
        }