public static string GetServiceSubTypes(int customerId, int[] selectedSourceIds) { var objAdminBAL = new clsAdminBAL(strToolConnString, strToolConnType); var json = JsonConvert.SerializeObject(objAdminBAL.GetServiceSubTypesForSource(customerId, selectedSourceIds)); return(json); }
public static string GetCustomer(int customerId) { var objAdminBAL = new clsAdminBAL(strToolConnString, strToolConnType); var json = JsonConvert.SerializeObject(objAdminBAL.GetCustomer(customerId)); return(json); }
public static string ValidateDataSource(int[] allSelectedSourceIds) { var objAdminBAL = new clsAdminBAL(strToolConnString, strToolConnType); var isSourceValidated = objAdminBAL.ValidateDataSource(allSelectedSourceIds); var json = JsonConvert.SerializeObject(new { isSourceValidated = isSourceValidated }); return(json); }
public static string ValidateCustomerName(string customerName) { var objAdminBAL = new clsAdminBAL(strToolConnString, strToolConnType); var isValidated = objAdminBAL.ValidateCustomerName(customerName); var json = JsonConvert.SerializeObject(new { isValidated = isValidated }); return(json); }
public static string ChangeCustomerStatus(int customerId, bool status) { var objAdminBAL = new clsAdminBAL(strToolConnString, strToolConnType); bool isStatusChanged = objAdminBAL.ChangeCustomerStatus(customerId, status); var json = JsonConvert.SerializeObject(new { isStatusChanged = isStatusChanged }); return(json); }
public static string GetDomains(int sourceId) { var objAdminBAL = new clsAdminBAL(strToolConnString, strToolConnType); var domains = objAdminBAL.GetDomains(sourceId); var json = JsonConvert.SerializeObject(new { domains = domains }); return(json); }
public static string GetFilterSchema(int envDetailAutoId) { var objAdminBAL = new clsAdminBAL(strToolConnString, strToolConnType); FilterSchema schema = objAdminBAL.GetFilterSchema(envDetailAutoId); FillOperatorsClausesInSchema(schema); var json = JsonConvert.SerializeObject(schema); return(json); }
public static bool SaveCustomerSource(int customerId, string json) { clsMyDBCommonAttrEntity objMyDBCommonEntity = new clsMyDBCommonAttrEntity(); clsSecurityFunction.GetUserSession(ref objMyDBCommonEntity); CustomerEntity customerEntity = JsonConvert.DeserializeObject <CustomerEntity>(json); var objAdminBAL = new clsAdminBAL(strToolConnString, strToolConnType); bool isSaved = objAdminBAL.SaveCustomerSource(customerId, customerEntity, objMyDBCommonEntity); return(isSaved); }
public static string GetAllCustomers() { clsMyDBCommonAttrEntity objMyDBCommonEntity = new clsMyDBCommonAttrEntity(); clsSecurityFunction.GetUserSession(ref objMyDBCommonEntity); var objAdminBAL = new clsAdminBAL(strToolConnString, strToolConnType); var isAddCustomerVisible = objMyDBCommonEntity.LoggedInUserRoleId == "4" ? true : false; var json = JsonConvert.SerializeObject(new { isAddCustomerVisible = isAddCustomerVisible, allCustomers = objAdminBAL.GetAllCustomers(objMyDBCommonEntity) }); return(json); }
public static string CanCustomerDeleted(int customerId) { var message = string.Empty; var objAdminBAL = new clsAdminBAL(strToolConnString, strToolConnType); bool canCustomerDeleted = objAdminBAL.CanCustomerDeleted(customerId); if (!canCustomerDeleted) { message = "Customer cannot be deleted as its associated with user(s)."; } var json = JsonConvert.SerializeObject(new { canCustomerDeleted = canCustomerDeleted, message = message }); return(json); }