public ActionResult Save(int id)
 {
     try
     {
         Insemination insemination = new Insemination();
         // insemination.EarNum = id;
         UpdateModel <Insemination>(insemination);
         Cow cow = bllCow.GetCowInfo(insemination.EarNum);
         int s   = insemination.EarNum;
         //根据用户输入的配种信息,判断是否存在此头牛的信息,如果不存在弹框提示
         if (cow.FarmCode == null)
         {
             return(RedirectToAction("../Index/List"));
         }
         else
         {
             //ToDo:将insemination对象的数据保存到数据库中
             bool isInsemExist = bllInsemination.IsInsemExist(insemination.EarNum, insemination.InseminationNum);
             if (isInsemExist == true)
             {
                 //bllInsemination.UpdateInseminationInfo(insemination);
             }
             else
             {
                 bllInsemination.InsertInseminationInfo(insemination);
             }
             return(RedirectToAction("../Index/List"));
         }
     }
     catch (Exception e)
     {
         return(View());
     }
 }