Ejemplo n.º 1
0
        public List <MasterTables> GetTimeCategories()
        {
            SqlCommand cmd = new SqlCommand("sp_selectMilk_TimeCategoriesAll", DALHelper.getConnection());

            return(selectMasterTablesData(cmd));
        }
Ejemplo n.º 2
0
        public List <EmployeeAttendance> GetEmployeeAttendances()
        {
            SqlCommand cmd = new SqlCommand("sp_selectEmployeeAttendancesAll", DALHelper.getConnection());

            return(selectEmployeeAttendances(cmd));
        }
Ejemplo n.º 3
0
        //Added - Dec 26th
        /// <summary>
        /// Modified March 13 - Updated SP to customersall2
        /// </summary>
        /// <returns></returns>
        public List <Customer> GetCustomers()
        {
            SqlCommand cmd = new SqlCommand("sp_selectCustomersAll2", DALHelper.getConnection());

            return(selectCustomers(cmd));
        }
        public List <AnimalMedicalRecord> GetAnimalMedicalRecords()
        {
            SqlCommand cmd = new SqlCommand("sp_selectAnimalMedicalRecordsAll", DALHelper.getConnection());

            return(selectAnimalMedicalRecords(cmd));
        }
Ejemplo n.º 5
0
        public List <Employee> GetEmployees_AttendanceToBeMarked()
        {
            SqlCommand cmd = new SqlCommand("sp_selectEmployees_AttendanceToBeMarked", DALHelper.getConnection());

            return(selectEmployees(cmd));
        }
Ejemplo n.º 6
0
        public List <ExpenseSubType> GetExpenseSubTypes(int IDtoSearch)
        {
            SqlCommand cmd = new SqlCommand("sp_selectExpenseSubTypes_byParentID", DALHelper.getConnection());

            return(selectExpenseSubTypes(cmd, IDtoSearch));
        }
        /// <summary>
        /// Added 18 March
        /// </summary>
        /// <param name="col"></param>
        /// <param name="param"></param>
        /// <returns></returns>
        public List <AnimalMedicalRecord> GetAnimalMedicalRecords(string col, string param)
        {
            SqlCommand cmd = new SqlCommand("sp_selectAnimalMedicalRecords_Filtered", DALHelper.getConnection());

            cmd.Parameters.AddWithValue("@Column", col);
            cmd.Parameters.AddWithValue("@QueryString", param);

            return(selectAnimalMedicalRecords(cmd));
        }
        public List <MilkingEntry> GetMilkingEntries()
        {
            SqlCommand cmd = new SqlCommand("sp_selectMilkEntriesAll", DALHelper.getConnection());

            return(selectMilkingEntries(cmd));
        }
Ejemplo n.º 9
0
        public List <ExpenseSubType> GetExpenseSubTypes()
        {
            SqlCommand cmd = new SqlCommand("sp_selectExpenseSubTypesAll", DALHelper.getConnection());

            return(selectExpenseSubTypes(cmd));
        }
        public List <Calf> GetCalfs()
        {
            SqlCommand cmd = new SqlCommand("sp_selectCalfsAll", DALHelper.getConnection());

            return(selectCalfs(cmd));
        }
        public List <MasterTables> GetAnimalBreeds()
        {
            SqlCommand cmd = new SqlCommand("sp_selectAnimalBreedsAll", DALHelper.getConnection());

            return(selectMasterTablesData(cmd));
        }
        //Added 5 Jan, 2015
        //Select only those cattles whose status of giving milk is 'Y'
        public List <Cattle> GetCattles_GivingMilk()
        {
            SqlCommand cmd = new SqlCommand("sp_selectAnimalsAll_Milking", DALHelper.getConnection());

            return(selectCattles(cmd));
        }
        public List <AnimalWithStatus> GetAnimals_All_WithStatuses()
        {
            List <AnimalWithStatus> statusList = new List <AnimalWithStatus>();

            SqlCommand cmd = new SqlCommand("sp_selectAnimals_all_withStatus", DALHelper.getConnection());

            cmd.CommandType = CommandType.StoredProcedure;
            SqlConnection con = cmd.Connection;

            con.Open();
            using (con)
            {
                SqlDataReader dr = cmd.ExecuteReader();
                if (dr.HasRows)
                {
                    statusList = new List <AnimalWithStatus>();
                    while (dr.Read())
                    {
                        AnimalStatusNew mObject = new AnimalStatusNew();

                        mObject.ID          = Convert.ToInt32(dr[0]);
                        mObject.Description = Convert.ToString(dr[3]);
                        mObject.Comments    = Convert.ToString(dr[4]);

                        if (Convert.ToChar(dr[5]) == 'N')
                        {
                            mObject.IsMilking = false;
                        }
                        else
                        {
                            mObject.IsMilking = true;
                        }

                        if (Convert.ToChar(dr[6]) == 'N')
                        {
                            mObject.IsFemale = false;
                        }
                        else
                        {
                            mObject.IsFemale = true;
                        }

                        if (Convert.ToChar(dr[7]) == 'N')
                        {
                            mObject.IsCalf = false;
                        }
                        else
                        {
                            mObject.IsCalf = true;
                        }

                        AnimalWithStatus ct = new AnimalWithStatus();

                        ct.ID           = Convert.ToInt32(dr[8]);
                        ct.TagNo        = Convert.ToString(dr[1]);
                        ct.UpdationTime = Convert.ToDateTime(dr[2]);
                        ct.Status       = mObject;

                        statusList.Add(ct);
                    }
                }
            }


            return(statusList);
        }
        public List <AnimalStatus> GetCattlestatuses()
        {
            SqlCommand cmd = new SqlCommand("sp_selectAnimalStatusesAll", DALHelper.getConnection());

            return(selectCattleStatuses(cmd));
        }
Ejemplo n.º 15
0
        //Added - Dec 27th
        //To populate listbox for role

        public List <UserType> GetUserTypes()
        {
            SqlCommand cmd = new SqlCommand("sp_selectUserTypesAll", DALHelper.getConnection());

            return(selectUserTypes(cmd));
        }
Ejemplo n.º 16
0
        public List <AnimalInsemnation> GetAnimalInsemnations()
        {
            SqlCommand cmd = new SqlCommand("sp_selectAnimalInsemnationsAll", DALHelper.getConnection());

            return(selectInsemnations(cmd));
        }