예제 #1
0
 public XmlDocument getLocalBodies(int district, int taluka, int localBodyType)
 {
     try
     {
         XmlDocument xmlDocument = new XmlDocument();
         OthersDAL   othersDal   = new OthersDAL();
         othersDal.getLocalBody(taluka, district, localBodyType);
         if (othersDal.isError == CommonCode.OK)
         {
             if (othersDal.Data != null && othersDal.Data.Tables[0].Rows.Count != 0)
             {
                 othersDal.Data.Tables[0].TableName = "LocalBodies";
                 XmlDataDocument xmlDataDocument = new XmlDataDocument(othersDal.Data);
                 XmlElement      element         = xmlDataDocument.DocumentElement;
                 return(xmlDataDocument);
             }
             else
             {
                 CommonCode commonCode = new CommonCode();
                 return(commonCode.ErrorXml(CommonCode.DATA_NOT_FOUND));
             }
         }
         else
         {
             CommonCode commonCode = new CommonCode();
             return(commonCode.ErrorXml(CommonCode.FAIL));
         }
     }
     catch
     {
         CommonCode commonCode = new CommonCode();
         return(commonCode.ErrorXml(CommonCode.SQL_ERROR));
     }
 }