public static List<Vendor> GetActiveVendorList()
 {
     List<Vendor> lstVendor = null;
     VendorManagementBLL objVendorManagementBLL=null;
     try
     {
     objVendorManagementBLL = new VendorManagementBLL();
     lstVendor = objVendorManagementBLL.GetVendorList(null, true);
     }
     catch(Exception ex)
     {
         // Log the error to a text file in the Error folder
         Common.WriteError(ex);
     }
     finally
     {
         objVendorManagementBLL = null;
     }
     return lstVendor;
 }
 public static bool DeleteSelectedVendor(string vendorIds,string Comment,bool IsActive)
 {
     bool isFlag = false;
      VendorManagementBLL objVendorManagementBLL = null;
      try
      {
          Common objCommon = new Common();
          objVendorManagementBLL = new VendorManagementBLL();
          string ModifiedBy =objCommon.GetCurrentUserName();
          isFlag = objVendorManagementBLL.Active_InactiveVendor(vendorIds, IsActive, Comment, ModifiedBy);
      }
      catch (Exception ex)
      {
          // Log the error to a text file in the Error folder
          Common.WriteError(ex);
      }
      finally
      {
          objVendorManagementBLL = null;
      }
      return isFlag;
 }
 public static Int32 AddNewVendor(Vendor vendor)
 {
     int isFlag = 0;
     Common objCommon = new Common();
     VendorManagementBLL objVendorManagementBLL = null;
     try
     {
         objVendorManagementBLL = new VendorManagementBLL();
         vendor.CreatedBy = objCommon.GetCurrentUserName();
         isFlag=objVendorManagementBLL.InsertVendor(vendor);
     }
     catch (Exception ex)
     {
         // Log the error to a text file in the Error folder
         Common.WriteError(ex);
     }
     finally
     {
         objVendorManagementBLL = null;
     }
     return isFlag;
 }
 public static List<DC> GetDCList()
 {
     List<DC> lstDC = null;
     VendorManagementBLL objVendorManagementBLL = null;
     try
     {
     objVendorManagementBLL = new VendorManagementBLL();
     lstDC = objVendorManagementBLL.GetDCList();
     }
     catch(Exception ex)
     {
         // Log the error to a text file in the Error folder
         Common.WriteError(ex);
     }
     finally
     {
         objVendorManagementBLL = null;
     }
     return lstDC;
 }