80 views

ASP.net MVC

{0}

Office automation export Excel as pdf

  private void saveBarButtonItem_ItemClick(object sender, ItemClickEventArgs e) { _pdfFilePath = Path.GetDirectoryName(_filePath) + "\\" + Path.GetFileNameWithoutExtension(_filePath) + ".pdf"; if (File.Exists(_pdfFilePath)) File.Delete(_pdfFilePath);   object pdfFilePath = _pdfFilePath; object oMissing = Missing.Value; object fileFormat = Excel.XlFileFormat.xlOpenXMLWorkbook; _excelDocument.ExportAsFixedFormat(Excel.XlFixedFormatType.xlTypePDF, pdfFilePath, Excel.XlFixedFormatQuality.xlQualityStandard, true, true, 1, 10, false); PdfFilePath = PdfFilePath; _excelDocument.Close(oMissing, oMissing, oMissing); releaseObject(_excelDocument); DialogResult = DialogResult.OK; }   private void […]

angular js directive for decimal number

Here you find a directive for angular js. input will be a valid decimal number. It will prompt your for spaces too.   app.directive(’validNumberdecimal’, function () { return { require: ‘ngModel’, link: function (scope, el, attrs, ngModel) { el.bind(’change’, function () { scope.$apply(function () { ngModel.$setViewValue(el.val()); ngModel.$render();   var number = el[0].value;   var re […]

twitter bootstrap list of changes made from version 2 in version 3

I used twitter bootstrap in my websites and wanted to migrate from version 2 to version 3. I had a CSS class “.hereo-unit” which is now called “.jumbotron”. Find a quick list of alternate classes in version 3 below. Bootstrap 2.x Bootstrap 3.0 .container-fluid .container .row-fluid .row .span* .col-md-* .offset* .col-md-offset-* .brand .navbar-brand .nav-collapse .navbar-collapse […]

1,924 views

BDD, programming

{0}

Using Moq in Mspec, Test failed with message ” the signature is incorrect”

I had a shared model layer in my solution.  I had only one web service which was implementing number of interfaces. Among those all operations in the interfaces One of the operation or function signature was using the shared model domain. I  wrote at least 12 tests all were pass but when I wrote test […]

4,020 views

programming

{1}

BDD – MVC – Account Controller using Dependency Injection/ MSpec/ Moq – part 1

After completing my installation I started playing with MSpec. I googled to see how people are using MSpec and what I can get from MSpec for my project. My First Test was as following: [Subject(typeof(AccountController)), Tags("Login")] public class When_Logging_Into_the_application_with_an_invalid_user_name_or_password : AccountControllerContext { //Arrange private static ViewResult _result; private static LoginModel _model; private static string _loginFailureMessage […]

1,744 views

ASP.net MVC, BDD

{0}

My first day to start Behaviour Driven Development (BDD) with MSpec and MVC.

My first day to start Behaviour Driven Development (BDD) with MSpec. After discussion within development we decided to go for Machine.Specifications (or MSpec for short) I used NuGet Package to install MSpec and I searched with word mspec but found nothing then searched with word Machine and found the mspec package (Machine.Specifications). I installed it. […]

4,113 views

ASP.net MVC

{0}

Asp.net mvc combine url dynamically c#

I was working to send a password re-set email to user and wanted to to create a URL dynamically i.e It should be including the http or https and wwww and domain name and application name and then the URL defined by my self. I created as follow which seems very clean way to do […]

how to change contents of pages like home page, contact us, about us on nopCommerce open source

If you have published nopCommerce with sample data and you want to edit existing data for above pages then Go to admin section–>Content Management –> Topics. This will show the list of pages click on edit link on the page to edit its contents.   To remove the featured product or change the featured products […]

Publishing or hosting asp.net mvc NOPCommerce website first time

No doubt nopCommerce team are doing a great job. I heard about NopCommerce from one of my friend who is working for some company as free lancer. I started google about nopCommerce and found good reviews and comments. I decided to exploer Nopcommerce. I  downloaded nopCommerce version 2.6 form the website . I manage to […]

Jquery Mobile development asp.net mvc 3 page layout

My first step to start developing mvc3 mobile website. I have created a website useing mvc3 . I started writing mobile version of my website. Obviously google was the place to start and alos one of my friend mentioned JQuery mobile to me. After spending some time on how and where to start I found […]