public static List<DC> GetDCList()
        {
            List<DC> lstVendor = null;
            DCManagementBLL objVendorManagementBLL = null;
            try
            {
                objVendorManagementBLL = new DCManagementBLL();
                lstVendor = objVendorManagementBLL.GetDCDetail();
            }
            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 DeleteDC(string DCId, string Comment)
        {
            DCManagementBLL objRoleManagementBLL = null;
            bool isFlag = false;
            try
            {
                objRoleManagementBLL = new DCManagementBLL();

                string ModifiedBy = GetCurrentUserName();

                isFlag = objRoleManagementBLL.DeleteDC(DCId, false, ModifiedBy);

            }
            catch (Exception ex)
            {
                // Log the error to a text file in the Error folder
                Common.WriteError(ex);
            }
            finally
            {
                objRoleManagementBLL = null;
            }
            return isFlag;
        }
        public static List<DC> GetDCType()
        {
            List<DC> lstroletype = null;
            DCManagementBLL objRoleManagementBLL = null;
            try
            {
                objRoleManagementBLL = new DCManagementBLL();
                lstroletype = objRoleManagementBLL.GetDCType();

            }
            catch (Exception ex)
            {
                // Log the error to a text file in the Error folder
                Common.WriteError(ex);
            }
            finally
            {
                objRoleManagementBLL = null;
            }
            return lstroletype;
        }
        public static string UpdateDC(DC roledetail)
        {
            string isFlag = string.Empty;
            DCManagementBLL objRoleManagementBLL = null;
              //  bool isFlag = false;
            try
            {
                objRoleManagementBLL = new DCManagementBLL();
                roledetail.ModifiedBy = GetCurrentUserName();

                isFlag = objRoleManagementBLL.UpdateDC(roledetail);

            }
            catch (Exception ex)
            {
                // Log the error to a text file in the Error folder
                Common.WriteError(ex);
            }
            finally
            {
                objRoleManagementBLL = null;
            }

            return isFlag;
        }
        public static string InsertDC(string DCName, int IsActive)
        {
            DCManagementBLL objRoleManagementBLL = null;
            string outResult = string.Empty;
               // bool isFlag = false;
            try
            {
                DC dc = new DC();
                dc.DCName = DCName;
                dc.IsActive = IsActive;
                objRoleManagementBLL = new DCManagementBLL();
                dc.CreatedBy = GetCurrentUserName();
                outResult = objRoleManagementBLL.InsertDC(dc);

            }
            catch (Exception ex)
            {
                // Log the error to a text file in the Error folder
                Common.WriteError(ex);
            }
            finally
            {
                objRoleManagementBLL = null;
            }

            return outResult;
        }