예제 #1
0
        /// <summary>
        /// 插入产犊记录
        /// </summary>
        /// <param name="c"></param>
        /// <returns></returns>
        public static int InsertCalvingRecord(Calving c)
        {
            int birthType = 0, inParityCount = 0;

            switch (c.BirthType)
            {
            case BirthType.Normal:
                birthType = 0;
                break;

            case BirthType.Miscarry:
                birthType = 2;
                break;

            case BirthType.PrematureBirth:
                birthType = 1;
                break;

            default:
                break;
            }
            if (c.InParityCount)
            {
                inParityCount = 1;
            }

            return(calvingDAL.InsertCalvingRecord(c.EarNum, c.Birthday, birthType, c.Difficulty, c.PositionOfFetus, c.FatherSememNum, c.OperatorID, c.Comment, c.NumberOfMale, c.NumberOfFemale, inParityCount));
        }
예제 #2
0
 /// <summary>
 /// 出入产犊记录,包含全部信息。
 /// </summary>
 /// <param name="c"></param>
 /// <returns></returns>
 public int InsertCalving(Calving c)
 {
     return(calvingDAL.InsertCalvingRecord(c.EarNum, c.Birthday, Convert.ToInt32(c.BirthType), c.Difficulty, c.PositionOfFetus, c.FatherSememNum, c.OperatorID, c.Comment, c.NumberOfMale, c.NumberOfFemale, (c.InParityCount?1:0)));
 }