visibility:hidden Vs display:none?

div
check here for more w3schools

 

 

ShowCover (1).jpgSams Teach Yourself HTML, CSS, and JavaScript All in One

Advertisements

Binding Bootstrap Dual ListBox with ASP.NET MVC

I have use duallist box from http://www.virtuosoft.eu/code/bootstrap-duallistbox/  to populate list of staff entity from controller that come back from a json request.

To load unselected and selected staff at the same time and display the unselected staff on the left side of dual listbox while selected one on right side.

In html:

 <select id="dualList" class="dualList" multiple="multiple" name="staffIds" size="10"></select>

In content:

 <%: Styles.Render( <%: Styles.Render( "~/Content/plugins/duallistbox/bootstrap-duallistbox.css" ) %>

In Script:

function initDualList(TRId) {
 $.ajax({
  url: "/RepresentativeAssignment/ListStaff/",
  type: "POST",
  data: { Id: Id},
  dataType: "json"
 }).then(querySuccess);

function querySuccess(data) {
   $(".dualList").html();
   $.each(data, function (index, value) {
    if (TRId.length == 0) {
    var option = $("").val(value.Id).text(value.StaffCode + " - " + value.StaffName);
    } else {
    if (value.StaffCode.indexOf("UnSelected-") >= 0) {
     var staffCodeStr = value.StaffCode.substring(11, value.StaffCode.length);
     var option = $("").val(value.Id).text(staffCodeStr + " - " + value.StaffName);
    }else{
     var option = $("").val(value.Id).text(value.StaffCode + " - " + value.StaffName).attr("selected", "selected");
    }
   } 
   $(".dualList").append(option);
  });

  $('.dualList').bootstrapDualListbox({
   preserveselectiononmove: 'moved',
   moveonselect: false
  });

  //remove 'moveall' and 'removeall' button in the dual listbox
  $('#dualList').parent().find('.moveall').css('display', 'none');
  $('#dualList').parent().find('.removeall').css('display', 'none');
 }
}

In Controller:

[HttpPost]
 public string ListStaff(long? staffId)
 {
   List listofStaff = new List();
   if (TRId == null)
   {
     listofStaff = SystemSeg.getAllActiveStaffNotUseInAssignmentMap();
    }
    else
    {
       var RepresentativeList = SystemSeg.getById((long)staffId);
        var AssignmentBaseOnCodeList =SystemSeg.getAllRepresentativeAssignmentMapByCode(RepresentativeList.Code);

        var AllActiveStaffNotUseInAssignmentMapList = SystemSeg.getAllActiveStaffNotUseInAssignmentMap();

         //Rest of Active Staff to be display on the left side of the duallist
         for (int i = 0; i < AllActiveStaffNotUseInAssignmentMapList.Count; i++)
         {
             User staff = SystemSeg.GetUserById(AllActiveStaffNotUseInAssignmentMapList[i].Id);
              staff.UserCode = "UnSelected-" + staff.StaffCode;
              listofStaff.Add(staff);
          }
    }
    return WebUtil.Serialize(listofStaff);
 }

Return PDF/TXT/XLS/PXLS to browser in ASP.NET MVC using crystal report

This example is using SAP crystal report for Visual studio. Can get a copy here for free.

Below sample show how to generate different file type format report to the browser dynamically.

 

In Controller:

public ActionResult PrintReport(string filters, string fileType)
 {
  var page = FilterPage(new Page<StaffOrder>(), filters);

  report = ReportUtil.GetReport<StaffOrder, StaffOrderReport>(StaffOrderModel.PropertyNames, page.result.OrderBy(x => x.StaffName).ThenBy(z => z.Id).ToList());
  ReportUtil.AssignBasicInfo(report, "Staff Order Report", WebUtil.GetUserDetails().username);

  return ReportUtil.GenerateReport(report, fileType);

 }

 

In ReportUtil class:

using System.Globalization;
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Shared;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Reflection;
using System.Web.Mvc;
using Microsoft.Office.Interop.Excel;

namespace STDSInternal
{
 public class ReportUtil
 {
 public static TK GetReport<T, TK>(string[] names, IList<T> items)
 where T : class
 where TK : ReportClass, new()
 {
 var report = new TK();
 report.Load();
 report.SetDataSource(GetDataTable<T>(names, items));
 return report;
 }
public static System.Data.DataTable GetDataTable<T>(string[] names, IList<T> items)
{
 var dt = new System.Data.DataTable();
 dt.Columns.AddRange(GetDataColumns(names));
 foreach (T item in items)
 {
 var objs = new List<object>();
 foreach (var name in names)
 {
 PropertyInfo pi = item.GetType().GetProperty(name);
 var obj = pi.GetValue(item);
 objs.Add(DoConversion(obj));
 }
 dt.Rows.Add(objs.ToArray());
 }
 return dt;
 }

public static DataColumn[] GetDataColumns(string[] columnNames)
 {
 return columnNames.Select(name => new DataColumn(name)).ToArray();
 }

public static FileStreamResult GenerateReport<T>(T report, string fileType) where T : ReportClass
 {
 var contentType = WebConstants.APPLICATION_PDF;
 switch (fileType)
 {
 case "txt":
   report.ExportOptions.ExportFormatType = ExportFormatType.Text;
   contentType = WebConstants.TEXT_PLAIN;
   break;
 case "xls":
   report.ExportOptions.ExportFormatType = ExportFormatType.Excel;
   contentType = WebConstants.TEXT_XLS;
   break;
 case "pxls":
   report.ExportOptions.ExportFormatType = ExportFormatType.ExcelRecord;
   contentType = WebConstants.TEXT_XLS;
   fileType = "xls";
   break;
 default:
   report.ExportOptions.ExportFormatType = ExportFormatType.PortableDocFormat;
   fileType = "pdf";
   break;
 }
 return new FileStreamResult(report.ExportToStream(report.ExportOptions.ExportFormatType), contentType)
 {
 FileDownloadName = report.SummaryInfo.ReportTitle + "." + fileType
 };

}

 

In WebConstants class file:

public static readonly string APPLICATION_PDF = "application/pdf";
public static readonly string TEXT_PLAIN = "text/plain";
public static readonly string TEXT_XLS = "text/xls";

 

 

 

 

 

Making a Simple Ajax call to controller in asp.net mvc to load data into dropdownlist

Controller:

 Public Function Get_Plant() As ActionResult
 Dim plantrole As New PlantRequestParam
 Dim rinfo = New Common.ResultInfo
 rinfo = iPlant.GetAllActiveList(plantrole)
 Return Json(rinfo)
End Function

View:

var AjaxUrl = "../Home/Get_Plant";
$.ajax({
 type: 'POST',
 url: AjaxUrl,
 contentType: 'application/json; charset=utf-8',
 success: function (data) {
 if (data.Status == true) {
 var taglist = data.Data;

$.each(taglist, function (index, value) {
 var opt = new Option(value.Name, value.Id);
 $(opt).attr('data-code', value.Code);
 $('#PlantDdl').append(opt);
 });

error: function (ex) {
 showAlert({
 Message: AjaxUrl + "
" + ex.status + " - " + $(ex.responseText).filter('title').text(),
 Status: false
 });
 });

To load into HTML li tag:

$.each(taglist, function (index, value) {
 list.append(' + value.Code + ');
 });

 

 

jhep-coursera-course4.pngHTML, CSS, and Javascript for Web Developers

Book: Digital To The Core

Digital to the Core by Mark Raskino and Graham Waller from Gartner, represents a very important addition to the growing literature on digital disruption, digital transformation and digital leadership.

The core argument of the authors is that standing still in an era of turbulent digital change is not an option. Enterprises and leaders must re-master themselves to succeed. Leaders must identify the key macro-digital forces impacting on their industry/organisation then provide leadership at three main levels industry, enterprise and self.

Digital revolution will fail unless the leaders can articulate 3 things:

1) Why must we innovate?
2) Where must we innovate?
3) How much must we innovate?

All leaders need to understand the impact of the digital revolution on their industries, organisations and leadership style.

The core of the book is structured around what the authors call the three primary disruptive forces of the digital age as shown in Figure 1 below:

Resolution Revolution: Sensors will lead to every product and service being digitally remastered. The Internet of Things, Industrial Internet and Big Data will allow us to accurately measure and precisely control things and events. Technology’s ability to capture and process entirely new kinds of data in ever richer detail will underpin the major breakthroughs of the digital age.

Compound Uncertainty: The daunting uncertainty that arises from the complex effects of rapid digital change; uncertainty that undermines and shifts the mind-sets, structures, and practices on which leaders have previously relied. Digital leaders must account for three crucial factors when estimating the timing of markets and digital changes – the ‘triple tipping points’ of technology, culture, and regulation.

 

Boundary Blurring: Merging of the digital and physical worlds, leading to alterations in the core products, propositions, and possibilities for industries as we know them and softening the dividing lines between industries. The effect then cascades across ecosystems, enterprises, people, and things transforming industries as we know them.
Building on the above, digital leaders must lead their organisation at three distinct levels:
  • Remap Your Industry: How your worldview needs to change. What fundamental industry paradigms must you rethink?
  • Remodel Your Enterprise: What does your enterprise need to become and how will you redefine your company?
  • Remake Yourself: Who do you need to be and how must you remake yourself as a digital era relevant leader?

Numerous case examples are presented to illustrate the key points raised above, with practical advice given on how to get there.

Digital to the Core is a highly recommended read for anyone serious about the impact of digital disruption on their industry, company and self.

More details can be found on Amazon

More reference can be found on future digital leadersGartner

Digital Transformation in Walmart

Digital Transformation is an ongoing movement from point solutions that deliver incremental value to integrated process and technology solutions that provide transformational outcomes in terms of Customer Experience, Business Efficiency and Business Innovation (Rajagopalan, A., 2015). Digital disruption varies within industries.  In enterprises, disruptive technologies help them get a realistic point of view on the market-place and gain a perspective toward business, monitoring insight by process and analyse data to help learn the trend customer feelings and come out with a better customer experience and processes. However, entertainment goods store had faced an unavoidable digital disruption, while department stores had faced more digital disruption when ecommerce and globalisation competes. Due to the perishable nature of goods and with relatively low value items sold in supermarkets, online sales will still be at a low proportion of total grocery sales. Even so, supermarket need to prepare for disruption as transaction volumes of the business was high.

Retailer sector fall in short fuse, big bang in digital disruption map. The vulnerability of retailer business to disruption on impact is huge and the access to change based on the extent of the products and services are hand over physically, digital channels were susceptible to use by customers, the computing networks contribution and framework in daily business operations, the degree of flexibility of customers and in workforce, the significant impact of social media and cloud computing and how government regulations  had inhibited the innovation in digital transformation.

As of today, the purchase transactions are more than selling and paying for products bought. Convenient will be the main demand for customer to experience more choices in selection, simple access and interfaces with a bigger range of selection offer. With all data stream of transactions, actionable insights can be generated as competitive advantage over others. This helps the business to meet the demands of customers and survive in the constant changing market environment.

Due to constant rapid changing environment and customer behaviour, increase in channel propagation and digitization in business and society, technology solutions and integrated process deliver outcomes which were transform with better innovative, business efficiency and customer experience. An overall view of the market-place and new business perspective by gathering, process and analyse data to generate insight were delivered from the transformational outcomes of the disruptive technology. Enterprises were help to get the overall view of potential new business perspective and market place which enable them to help them understand the trends and customer requirements in a better way and to formulate a more effective experiences and processes.

Furthermore, digital transformation also includes changing the normal business processes with the use of meaningful technology application which are constantly engaging and connected. This help to streamline the business process, reduce costs and improve efficiencies across the transactional cycle. Retailers need to rethink their business model which radically affects every aspect of their business from sourcing and pricing strategies to inventory planning, employee training and customer experience management. Necessary innovative capabilities need to be added into and keeping new strategize imperative in mind to survive in a highly competitive marketplace. Having identifying the bottleneck or loopholes, improve operational efficiency and the convergence of evolved technologies, processes and enterprise solutions in the system for delivering transformational customer experience. There will be a shift which retailer has to change from ‘customer interaction’ to ‘customer engagement’ in providing customer personalisation experience. Elements of traditional shopping experience were replaced by apps and kiosks, environment of store were call to evolve.  Retailer are trying their best to cater for the increase number of customer who are moving to online platforms by redefining delivery models and enriching shopping experience across all touch-points and channels .

coursera.jpg

Although there are still gaps in understanding the reason why consumer choose among brands on ecommerce over the internet even though it is an indispensable tool use by marketers to study the relationship between the degree of digitization across the decision made by consumer and their likelihood of selecting a brand after a consideration and evaluation of the item quality. With social media as one of the most powerful platforms which enable to increase customer engagement. Hence the growth of social media is important. It has not been just for creating brand awareness but it also helps to create good relationships between marketers and customers. Social media has change the world and it has brought people closer to markets. Retailer can use social media to obtain more information related to the customers and markets.

Walmart, a multinational supply chain company who operates a chain of hypermarkets, discount department stores and grocery stores was founded in year 1962 and incorporated in year 1969. The company was listed in New York Stock Exchange in 1972, and listed in Fortune Global 500 list in 2016. Currently Walmart has 11,539 stores and clubs in 28 countries and 2.2 million employees.

In this few years, Walmart had reinvented their business model from a brick and mortar stores to a more customer-centric e-commerce across online, mobile and brick and mortar stores. From investing in technology to its multi-format portfolio, Walmart integrate digital and physical retail, allowing customer to shop in their own terms. As the retailer focus on customer relevance it continues to make progress on e-commerce initiatives, creating transformative growth through its capabilities. Investment is focused on improving the customer experience and fulfilment capacity to provide option that customer expect. The growth of online and mobile commerce has created massive shift in the customer retail experience which may led to premature death of many brick and mortar stores that known as mainstay of retail for many years. Digital transformation has change the retailer current processes to deliver new and advance capabilities that provide increased sales, faster inventory turns, higher margin and an optimized customer experience.  These two physical and digital assets will able to deliver the best possible integrated experience to customer both online and offline and compete will competitor such as Amazon and EBay.

Walmart has setup a WalmartLab by acquiring digital startups. A unit of Global e-Commerce hub for platform and product creation around social and mobile commerce that supports their millions of customers to discover, research and shop products online, through mobile apps or at physical stores. This had accelerated the effort in meeting the needs of customers. WalmartLab which grow from a small team of talents to many mini startsup inside the company where each specialize in different areas such as search engine, comparative intelligence and pricing, and item selection and inventory flow. With their innovative work in comparative intelligence and pricing, enable Walmart to determine what products to sell by feeding with wold’s information on pricing on a piece of product into the pricing engine. Through these mini startups in the company having an open minded culture, is able to bring back the digital disruption mind-set back into the company, to have a progressive nature to be able to solve problems. Trust, transparency and fairness will be the key value to success where each team need to let everyone know what and why they are doing.

In year 2010, Walmart had acquired VUDU, an online media content entertainment provider and started providing disc-to-digital program, allowing customers to store their disc and DVD in the cloud, stream movies and TV content through a device on a pay-per-view basis. The retailer had provided service which allows users to get Walmart gift card reimbursement if they pay more for the same item at Walmart relative to a competitor’s store. This enables them to hammer a price leadership message and gives shopper little reason to go elsewhere for price comparison, thus driving their volume-based business model.

 Walmart implemented a warehouse management system where it determines the place where the packet should be deliver and how to get there. Many staff was hired to work on the supply chain. Although there are thousands of stores around the world but with the integration of mobile and desktop service enable them to success. Besides, thousands of engineers, data scientists and other IT professionals wrote one-of- kind of application in their e-commerce labs in Silicon Valley, India and Shanghai. With the use of open source and agile development tools that newly setup tech startups use. Large Hadoop data management clusters now run across custom-built hybrids clouds to support thousands of applications that were used at frontend customer and backend employee (Nash, K.S., 2015).

There is different mind-set in merchandising an aisle compared to a search result that promotes shopping as customer interaction is different between an online store and physical stores. Walmart had recognized this and created vaunted systems that allow prices to be cut in physical store on everything. In year 2011, Walmart acquire Kosmix, a data analytic startup who form the core of the global e-commerce technology group. Open source tool were used to build a better search engine to provide high speed, highly tuned search capabilities to help shoppers find what they want and also prompt them to buy more goods through personalized recommendations. With the list of key words generated by the search engine enable Walmart to return tailor results base on the past interactions which analysed by algorithms. In year 2012, online sales increase by 20 percent. Walmart also involve in the digital marketing. More than 100 staff is involved in this area to focus on building products which matter to customers around the globe in teams. With new digital platform will harness big data through information from online sales, social media and in-store purchase. The data will be used to enhance the retailer’s digital marketing. Customer loyalty program were implemented with technology which push digitally, this provide them a cutting edge over their competitors.

The retailer has put a huge amount of effort in leveraging its social media presence and embraced the timeline to showcase how the brand has grown over time. The company has clocked up a whopping 34 million people likes in Facebook, 595 thousand followers, 82 thousands of followers in Google plus and 809 thousands of followers in Twitter. There are positive and negative feedbacks, the retailer see the negative feedback often, and respond to it professionally and sort out the issue with the customers. Through the acquired of Kosmix to work under WalmartLab, a social media technology provider whose platform enable filter and organize content in social networks to facilitate conversations. With this, they were working on to create technologies that combine social and ecommerce capabilities. With retailer business analytics and research team, surveys and huge data collected online and offline will transform into innovative business models. Measurements and insights will be generated. Shopper patterns will be understood and by using big data to influence areas across their business. The digital side of the business of Walmart is more than just a website. It is the intersection of digital and physical side of supply chain system.

Walmart also retail many stocks products made in more than 70 countries and at any given time, operate in more than 11,000 stores in 27 countries around the world. Inventory of the retailer cost $32 billion. With such big amount of figures, Walmart need an efficient and effective supply chain management strategy. Business model which is committed by the entire organisation needed to be cost driving out of the supply chain to enable customers to save money. The retailer has done well in managing the inventory turnover, operating profit of any discount retailer internationally with a successful supply chain management. With the main priority of providing customers with goods whenever and wherever they wanted, high structure and advanced supply chain strategy were used to exploit and enhance the competitive advantage and position in market leadership. Vendor Managed Inventory (VMI) was responsible for managing the products in the warehouse and it was expected to be hundred percent close to order fulfilment on merchandise. Strategic sourcing was embarked to find products at the best price from suppliers who are can meet the demands. Strategic partnership will be established for long term and high volume purchases in exchange of lower possible prices (Lu, C., 2016). Streamlined of supply chain management were made by building up communication and relationship networks with suppliers to improve the flow with low inventories. With the state of art technology and network design enable the retailer to forecast accurately the demand, track and predict the inventory levels, creating highly efficient traffic route, and manage customer relationship and service response logistic. Having product bar code enable immediate collection and analysed of products. Through global satellite system, real time sales data can be display for analyst to forecast the supplier demand to the network.

With the implemented of mobile inventory apps to search inventory and see a hot map of products on the selves enable staff in the stores to trace, locate what are the hot items during the holiday season such as black Friday and Christmas and to collect qualitative customer data without create a loyalty program. E-commerce with drone was also tested to improve the delivery. Hybrid cloud computing platform were built so that mix internal and external cloud services were implemented to avoid being locked in a single cloud service after acquire One Ops, a cloud computing company. Supply chain is their core of business. Walmart inventory management and supply chain system enable them to offer in a lower price which makes more affordable wholesale merchandise to members and helps make saving simple for families and small business owners.  More than 200 IT specialists were involved in the supply chain to beef up that area of business.

Having a centralize database, store-level point-of-sale system and a satellite network enable every suppliers and manufacturers who are in the supply chain able to synchronize their demand projections for planning, forecasting and replenishment. With this innovation, information can be share with all partners for free. This approach also will reduce centralized control and informal, frequent distributions between centers and suppliers and enable merchandise to be pulled by the customers effectively rather than being push by the company to top up stock on the selves.

Walmart has also encouraged its suppliers to used radio frequency identification tags (RFID) to track pallets of merchandise moving along the supply chain when parties, Walmart and suppliers handle the inventory at the same time. With this smart tag, it can be read easily by handheld scanner, allowing employee to restock more efficient and monitor the inventory.  With an automated re-ordering system which link to supplier system through satellite communication system, enable supplier to deliver to its distribution center or directly to the particular store.

Walmart eight distinctive success factors that define the generic discount retail business model: pricing, pressure over vendors, investment in technology, human resource practices, expansion policies, product selection, cost consciousness, and customer service. (Brea-Solís, H., Casadesus-Masanell, R. and Grifell-Tatjé, E., 2012). However in order for every business to transform into a digital business, digital technology are exploited to find new sources of value for customers and increase operational agility. Successful digital business transformation requires leaders’ full support to drive investment priorities. Not all leaders have a set clear vision for digital, and not all executives will understand the firm’s digital strategy beside those in business digital team which then lead to unprepared to face digital disruption. In addition to that, digital leaders need to constantly upgrade the digital skills of existing employees or hire digitally skilled employees while they should embrace digital as the core technology imperative. Responsibility of digital should spread between multiple teams in order to make digital strategy to work well. Walmart had a vision of twenty years to enhance their social and digital commerce with the vision of allowing customer to access wherever and whenever.

The constant changing of digital era does change the rules of business. Customers are becoming more demanding and power is shifting toward them, while competitors are forcing to have more disruption especially when it comes to real time process. New business strategy has to be developed to optimize the use of technologies and define the path of the organization. Walmart had identity their customer needs and started innovate products for their customer new experience. Having the brick and mortar stores unable to solve the problem for their customers, for example queueing for payment consume a lot of time, which frustrated the customer. Through digital ecommerce platform, this can be eliminated, while more customers from different places can access to generate more sales. Externally, new search engines, cloud service, product comparison feature, online services were innovated to allow customer to have a new experience of remain loyal to purchase from them. Internally, advance supply chain management and customer relationship management system were developed to cater for complicated inventory management while maintain a good relationship with suppliers in order to have price leadership strategy. Big data strategies were used for improving business process by identifying opportunities in the market.

Once it recognizes the need for changes. Retooling the operation to provide new capabilities or integrating existing to the new capabilities. Such major changes will need corporation of leader set as a role model while driving the adoption of a digital culture while all employees follow to embrace, tolerate to the new changes and adapt to the new way of working. Sufficient of time to allow employees to adopt and champion the new practices and retailer may need to delay or loss steam entirely on multichannel transition (Building a digital culture & How to meet the challenge of multichannel digitization, 2013). Training for the employees, convincing them to change and reinforcing the changes behaviour in formal and informal ways able to create ripple effect from the small changes.

Digital technology has, and will continue to change the business model. The pace of change is accelerating and organization will have to constantly seek digital solution to solve it regardless they need it or not in their business.

What do you think about digital transformation in your company? Will they able to improve their sustainability without the help of digital transformation? Do share your thought here.

References

McKinsey (2014) How digital is transforming retail: The view from eBay. Available at: http://www.mckinsey.com/industries/retail/our-insights/how-digital-is-transforming-retail-the-view-from-ebay (Accessed: 3 August 2016).

Solis, B. (2014) Digital transformation and the race against digital Darwinism. Available at: http://www.briansolis.com/2014/09/digital-transformation-race-digital-darwinism/ (Accessed: 3 August 2016).

Rajagopalan, A. (2015) Digital Transformation. Available at: http://www.happiestminds.com/whitepapers/digital-transformation-in-retail.pdf (Accessed: 8 August 2016).

Berge, F. (2016) Walmart: A surprising winner in Omnichannel retail. Available at: https://digit.hbs.org/submission/walmart-a-surprising-winner-in-omnichannel-retail/ (Accessed: 8 August 2016).

Digital DIsruption Short Fuse, Big Bang (2012) Available at: http://www2.deloitte.com/content/dam/Deloitte/au/Documents/Building%20Lucky%20Country/deloitte-au-consulting-digital-disruption-whitepaper-0912.pdf (Accessed: 18 August 2016).

Nash, K.S. (2015) Wal-Mart revamps e-commerce technology as Amazon applies pressure. Available at: http://blogs.wsj.com/cio/2015/11/25/wal-mart-revamps-e-commerce-technology-as-amazon-applies-pressure/ (Accessed: 19 August 2016).

McBacon, H., Busen, E., Mitchell, C., Caley, A. and Voci, A. (2015) Walmart: Outside its comfort zone in digital transformation. Available at: https://openforum.hbs.org/challenge/understand-digital-transformation-of-business/why-digital/walmart-outside-its-comfort-zone-in-digital-transformation (Accessed: 28 August 2016).

Berge, F. (2016) Walmart: A surprising winner in Omnichannel retail. Available at: https://digit.hbs.org/submission/walmart-a-surprising-winner-in-omnichannel-retail/ (Accessed: 28 August 2016).

De Clerck, J.-P. (2016) Transforming the retail industry in a new consumer and technology reality. Available at: http://www.i-scoop.eu/digital-transformation/retail-industry-digital-mobile-shopping-transformation/ (Accessed: 28 August 2016).

Lu, C. (2016) Walmart’s successful supply chain management. Available at: https://www.tradegecko.com/blog/incredibly-successful-supply-chain-management-walmart (Accessed: 28 August 2016).

Taylor, K. (2016) ‘Walmart destroyed retail’. Available at: http://www.businessinsider.sg/walmart-destroyed-retail-2016-8/?r=US&IR=T#uuxPBVjkaYhBVti1.97 (Accessed: 28 August 2016).

Manjoo, F. (2012) Walmart’s evolution from big box giant to e-commerce innovator. Available at: https://www.fastcompany.com/3002948/walmarts-evolution-big-box-giant-e-commerce-innovator (Accessed: 28 August 2016).

E-ccomerce – New Opportunities, New Barriers (2012) Available at: https://www.wto.org/english/tratop_e/serv_e/wkshop_june13_e/ecom_national_board_e.pdf (Accessed: 28 August 2016).

Brea-Solís, H., Casadesus-Masanell, R. and Grifell-Tatjé, E. (2012) Business Model Evaluation: Quantifying Walmart’s Source of Advantage. Available at: http://www.hbs.edu/faculty/Publication%20Files/13-039%20Nov%202012_612ce7e2-7f81-4eea-9126-3c0964f2be2f.pdf (Accessed: 28 August 2016).

Building a digital culture & How to meet the challenge of multichannel digitization (2013) Available at: https://www.strategyand.pwc.com/media/file/Strategyand_Building-a-Digital-Culture.pdf (Accessed: 28 August 2016).

 

bookcover-jumping-cs6Revive: How to Transform Traditional Businesses into Digital Leaders

Finally! The Result!

At last! Waited for ages the exam results and now they’re out! I have pass all my subjects and completed all the modules for my MBA course. I am free to graduate!

result

Follow by this is to get a job related to what I’ve studied. But finding the job which is related is tough, mostly experience one’s will get the job instead of the fresh graduate. I guess I have to put more effort in my job and family.

 

Load XML into Database

Load xml file into store procedure to insert into table.

Sample xml file:

<?xml version='1.0' encoding='UTF-8' ?>
<FctTypes>
 <reportType>SSS</reportType>
 <tradingDate>01-Jun-2017</tradingDate>
 <period>1</period>
 <Details>
   <facilityType>AAA</facilityType>
   <grossInjection>111.11</grossInjection>
   <netInjection>222.22</netInjection>
 </Details>
 <Details>
   <facilityType>BBB</facilityType>
   <grossInjection>333.33</grossInjection>
   <netInjection>555.55</netInjection>
 </Details>
 <Details>
   <facilityType>CCC</facilityType>
   <grossInjection>122.11</grossInjection>
   <netInjection>244.22</netInjection>
 </Details>
</FctTypes>
<FctTypes>
 <reportType>SSS</reportType>
 <tradingDate>01-Jun-2017</tradingDate>
 <period>2</period>
 <Details>
   <facilityType>AAA</facilityType>
   <grossInjection>111.11</grossInjection>
   <netInjection>222.22</netInjection>
 </Details>
 <Details>
   <facilityType>BBB</facilityType>
   <grossInjection>333.33</grossInjection>
   <netInjection>555.55</netInjection>
 </Details>
 <Details>
   <facilityType>CCC</facilityType>
   <grossInjection>122.11</grossInjection>
   <netInjection>244.22</netInjection>
 </Details>
</FctTypes>

In database store procedure:

@strMG01 contain the string of content in xml file which pass from the application.

DECLARE @docHandle INT
DECLARE @xml XML = @strMG01

 CREATE TABLE #TempMG01(
 [Period] [smallint] NULL,
 [ReportType] [varchar](2) NULL,
 [TradingDate] [datetime] NULL,
 [FacilityType] [varchar](60) NULL,
 [GrossInjection] [varchar](60) NULL,
 [NetInjection] [varchar](60) NULL
 )

 INSERT INTO #TempMG01

 SELECT 
 a.Period,
 a.ReportType,
 a.TradingDate,
 a.FacilityType,
 a.GrossInjection,
 a.NetInjection
 FROM(

 SELECT 
 tbl.TempMG01.value('reportType[1]', 'VARCHAR(2)') ReportType,
 tbl.TempMG01.value('tradingDate[1]', 'DATETIME') TradingDate,
 tbl.TempMG01.value('period[1]', 'smallint') Period,
 i.pd.value('facilityType[1]', 'VARCHAR(60)') FacilityType,
 i.pd.value('grossInjection[1]','VARCHAR(60)') GrossInjection,
 i.pd.value('netInjection[1]','VARCHAR(60)') NetInjection
 FROM @xml.nodes('//FctTypes') AS tbl(TempMG01)
 CROSS APPLY @xml.nodes('//FctTypes/Details') AS i(pd)
 ) a

after this you can just insert it into the table you intended with a insert statement.

Sample inserted record as below:

Untitled.jpg

 

Authorization failure for Ajax request in MVC application

I encounter an ajax request authorization failure and causes bad user experience. I had click on a button which require ajax response in my ASP.net MVC application which already timout. Below is the way to handle it properly without getting any bugs.

I have created a OnAuthorizationModule action filter to check on each action to determine which pipeline to go. If IsAjaxRequest is true, it will throw HttpException, else it will redirect to error page.

 

ajax1

JQuery global error handle will receive the exception and display error message accordingly.

ajax2

 

ajax3.JPG