Beispiel #1
0
 public static string DeleteBigData(string ParentId)
 {
     try
     {
         if (!string.IsNullOrEmpty(ParentId.Filter()))
         {
             BLL_TestPaper_FrameDetail bll = new BLL_TestPaper_FrameDetail();
             if (bll.GetRecordCount("ParentId='" + ParentId + "'") > 0)
             {
                 return("2");
             }
             else
             {
                 if (bll.Delete(ParentId))
                 {
                     return("1");
                 }
                 else
                 {
                     return("");
                 }
             }
         }
         else
         {
             return("");
         }
     }
     catch (Exception)
     {
         return("");
     }
 }
Beispiel #2
0
        public static string DeleteSmallData(string TestPaper_FrameDetail_Id, string TestPaper_Frame_Id)
        {
            try
            {
                TestPaper_FrameDetail_Id = TestPaper_FrameDetail_Id.Filter();
                TestPaper_Frame_Id       = TestPaper_Frame_Id.Filter();
                if (!string.IsNullOrEmpty(TestPaper_FrameDetail_Id) && !string.IsNullOrEmpty(TestPaper_Frame_Id))
                {
                    if (new BLL_TestPaper_FrameToTestpaper().GetRecordCount("TestPaper_Frame_Id='" + TestPaper_Frame_Id + "'") > 0)
                    {
                        return("2");
                    }
                    if (new BLL_TestPaper_FrameToTestpaper().GetRecordCount("TestPaper_Frame_Id='" + TestPaper_FrameDetail_Id + "'") > 0)
                    {
                        return("3");
                    }
                    else
                    {
                        BLL_TestPaper_FrameDetail bll = new BLL_TestPaper_FrameDetail();

                        if (bll.Delete(TestPaper_FrameDetail_Id))
                        {
                            return("1");
                        }
                        else
                        {
                            return("");
                        }
                    }
                }

                else
                {
                    return("");
                }
            }
            catch (Exception)
            {
                return("");
            }
        }