Chandra Oemaryadi has written 244 articles

Azure Migrate ARM VM to Another Subscription

Find this VM, click on its Subscription, select All the related resources, choose the object subscription ID and resource group (new one or existing one) to start migration. Resources will disappear for a while, and appear again with new subscription ID. If migration failed with error message like “resource provider not registered”, that is because…

ASP C# Backup PostgreSQL Database

Berikut contoh kode untuk mem-backup database PostgreSQL [code language=”csharp”] public class BackupDatabaseController : Controller { public string Index() { string response = "Backup has been Successfull !!"; string timestamp = DateTime.Now.ToString("yyyyMMdd"); string file = String.Format("{0}.sql", timestamp); string savePath = Server.MapPath(Url.Content("~/Backup")) + "\\"; string fullPath = savePath + file; string executablePath = WebConfigurationManager.AppSettings["PostgresPgDump"]; string conn =…

Login Azure Database using Sql Server Management Studio

Panduan untuk login ke Azure database menggunakan SQL Server Management Studio 1. Pilih database server yang ingin di-manage menggunakan SQL Server Management Studio 2. Klik Firewall 3. Klik “Add client IP” https://azure.microsoft.com/en-us/documentation/articles/sql-database-configure-firewall-settings/ Important: If you do not see the option for Firewall on the blade you are looking at, go back and make sure that…

MVC Default Validation Message

Default validation message di MVC [code language=”csharp”] [ArgumentIsNullOrWhitespace, The argument ‘{0}’ cannot be null, empty or contain only white space.] [AssociatedMetadataTypeTypeDescriptor_MetadataTypeContainsUnknownProperties, The associated metadata type for type ‘{0}’ contains the following unknown properties or fields: {1}. Please make sure that the names of these members match the names of the properties on the main type.]…

Kendo Grid inside Kendo Window / Modal

[code language=”html”] <div id="window"> <div id="lookup-grid" class="grid"></div> </div> [/code] [code language=”javascript”] var ds; function OpenLookup() { ds.read(); var dialog = $("#window").data("kendoWindow"); dialog.open().center(); } function SelectItem(e) { e.preventDefault(); var data = this.dataItem(getDataRowGrid(e)); $(‘#window’).data(‘kendoWindow’).close(); $(‘#TableCustomerId’).val(data.CustomerId); $(‘#TableCustomerCode’).val(data.CustomerCode); $(‘#TableCustomerName’).val(data.CustomerName); } $(document).ready(function () { ds = new kendo.data.DataSource({ pageable: true, pageSize: 10, serverFiltering: true, serverPaging: true, serverSorting: true, sortable:true, transport:…

Visual Studio Rename Project

Tahapan me-rename project (folder dan namespace) pada Visual Studio To rename a project’s folder, file (.*proj) and display name in visual studio: Close the solution. Rename the folder(s) outside Visual Studio. (Rename in TFS if using source control) Open the solution, ignoring the warnings (answer “no” if asked to load a project from source control).…