Friday, August 21, 2015

IIS Installment Steps



Install IIS Guide

This guide is a walkthrough of necessary steps for installing IIS on windows.

1.    IIS Installment Steps

  1.       Go to start  -> Control panel
 


 

   2.       Go to Programs


 3.       Click  Turn Windows Feature on or off

 

 

 


4.       Click  on the following  Feature on

 

 


            5.       Scroll down the windows feature window and also select the following feature



            6.       Press ok a progress bar will appear.






7.      Once the installation is over, to confirm it, simply type the following URL into your browser: http://localhost.






            If installation is successful, then you will see the following screen:


   NB: if you cannot see this screen on the browser, restart your PC and try it again.

 2.    IIS Open Steps


             1.       Type IIS on search program and files





             2.       IIS window will appear







                                                     
                                                   



                                           

Wednesday, August 5, 2015

T-SQL single parameter will perform like search on multiple table column



 ALTER PROCEDURE [dbo].[USP_GetPickerNameList]  
       @SearchStr varchar(50)  
 AS  
 BEGIN  
 SET @SearchStr = RTRIM(@SearchStr) + '%'  
 SELECT DISTINCT TOP(10)  
       p.cpickerid  
      ,p.cpickername  
      ,p.cpickeridtype  
      ,p.cid  
      ,p.cidissuingstate  
      ,p.pickerid_PK  
      ,p.pickeridtype_FK  
      ,p.idissuingstate_FK  
      ,c.ccusname  
      ,c.cusid_PK  
      ,c.dbirthday  
      ,f.caddress1  
 FROM pickers p  
 INNER JOIN pickergroups  
      ON p.pickerid_PK = pickergroups.pickerid_FK  
 INNER JOIN customer c  
      ON c.pickergroupid_FK = pickergroups.pickergroupid_PK  
      LEFT OUTER JOIN family f on c.familyID_FK = f.familyID_PK   
      LEFT OUTER JOIN rx r on c.cusId_PK = r.cusId_FK  
 WHERE  RTRIM(LTRIM(p.cpickername)) LIKE @SearchStr  
           OR RTRIM(LTRIM(c.ccusname)) LIKE @SearchStr  
           OR RTRIM(LTRIM(c.ccusfirstname)) LIKE @SearchStr  
           OR RTRIM(LTRIM(c.ccuslastname)) LIKE @SearchStr  
           OR RTRIM(LTRIM(r.rxno_PK)) LIKE @SearchStr  
 ORDER BY p.cpickername  
 END  


Entity Framework to Class object null check

date time null is a common problem in EF, we can easily handle with this.

  if (pic.dbirthday != null)  
       {  
         bo.dbirthday = Convert.ToDateTime(pic.dbirthday.Value.Date.ToString("MM/dd/yyyy"));  
       }  

Bank Management Project in C Language

hi i am helping my sister to create a simple bank management project. i like to share with you




 #include <stdio.h>  
 #include <conio.h>  
 #include <string.h>  
 #include <stdlib.h>  
 // Structure declaration  
 struct acc_type  
 {  
   char bank_name[20];  
   char bank_branch[20];  
   char acc_holder_name[30];  
   int acc_number;  
   char acc_holder_address[100];  
   float available_balance;  
 };  
 struct acc_type account[20];  
 int num_acc; // Global variable  
 void Create_new_account();  // Create_new_account function declaration  [ This function will create a new customer account ]  
 void Cash_Deposit();     // Cash_Deposit function declaration     [ this function will Cash_Deposit money for specific account ]  
 void Cash_withdrawl();    // Cash_withdrawl function declaration    [ this function will withdaw money from specific account ]  
 void Account_information(); // Account_information function declaration [ this function will show specific account details information ]  
 void Log_out();        // Log_out function declaration       [ this function exit the program ]  
 void display_options();   // display_options function declaration   [ this function displaying all the menu ]  
 /* main program */  
 int main()  
 {  
   char option; // local variable  
   num_acc=0;  
   printf("\n***** Floret Bank Management System *****\n");  
   display_options();  
   printf("Please enter any options (1/2/3/4/5/6) ");  
   printf("to continue : ");  
   option = getch(); // reading input value  
   printf("%c \n", option);  
   switch(option)  
   {  
   case '1':  
     Create_new_account();  
     break;  
   case '2':  
     Cash_Deposit();  
     break;  
   case '3':  
     Cash_withdrawl();  
     break;  
   case '4':  
     Account_information();  
     break;  
   case '5':  
     return 0;  
   case '6':  
     system("cls");  
      main();  
     break;  
   default :  
     system("cls");  
     printf("Please enter one of the options");  
     printf("(1/2/3/4/5/6) to continue \n ");  
     main();  
     break;  
   }  
 }  
 /*Function to display available options in this application*/  
 void display_options() // showing the menu in the screen  
 {  
   printf("\n1. Create new account \n");  
   printf("2. Cash Deposit \n");  
   printf("3. Cash withdrawl \n");  
   printf("4. Account information \n");  
   printf("5. Log out \n");  
   printf("6. Clear the screen and display available ");  
   printf("options \n\n");  
 }  
 /* Function to create new account */  
 void Create_new_account()  // new account function implementation  
 {  
   char bank_name[20];  
   char bank_branch[20];  
   char acc_holder_name[30];  
   int acc_number;  
   char acc_holder_address[100];  
   float available_balance = 0; // initial balance for the customer  
   fflush(stdin);  
   printf("\nEnter the bank name       : ");  
   scanf("%s", &bank_name);  
   printf("\nEnter the bank branch      : ");  
   scanf("%s", &bank_branch);  
   printf("\nEnter the account holder name  : ");  
   scanf("%s", &acc_holder_name);  
   printf("\n Please Enter the account number(1 to 10): ");  
     scanf("%d", &acc_number);  
   printf("\nEnter the account holder address : ");  
   scanf("%s", &acc_holder_address);  
   strcpy(account[acc_number-1].bank_name,bank_name);  
   strcpy(account[acc_number-1].bank_branch,bank_branch);  
   strcpy(account[acc_number-1].acc_holder_name,acc_holder_name);  
   account[acc_number-1].acc_number=acc_number;  
   strcpy(account[acc_number-1].acc_holder_address,acc_holder_address);  
   account[acc_number-1].available_balance=available_balance;  
   printf("\nAccount has been created successfully \n\n");  
   printf("Bank name       : %s \n" ,  
       account[acc_number-1].bank_name);  
   printf("Bank branch      : %s \n" ,  
       account[acc_number-1].bank_branch);  
   printf("Account holder name  : %s \n" ,  
       account[acc_number-1].acc_holder_name);  
   printf("Account number     : %d \n" ,  
       account[acc_number-1].acc_number);  
   printf("Account holder address : %s \n" ,  
       account[acc_number-1].acc_holder_address);  
   printf("Available balance   : %f \n" ,  
       account[acc_number-1].available_balance);  
   GotoMainMenu();  
 }  
 // Displaying account informations  
 void Account_information()  
 {  
    auto int acc_no;  
   printf("Enter account number you want to show information:");  
   scanf("%d",&acc_no);  
   register int num_acc = 0;  
 int i;  
 for(i=0;i<=19;i++)  
 {  
 if (account[i].acc_number==acc_no)  
 {  
     printf("\nBank name        : %s \n" ,account[i].bank_name);  
     printf("Bank branch       : %s \n" ,account[i].bank_branch);  
     printf("Account holder name   : %s \n" ,account[i].acc_holder_name);  
     printf("Account number      : %d \n" ,account[i].acc_number);  
     printf("Account holder address  : %s \n" ,account[i].acc_holder_address);  
     printf("Available balance    : %f \n\n" ,account[i].available_balance);  
     break;  
 }  
 }  
   GotoMainMenu();  
 }  
 // Function to deposit amount in an account  
 void Cash_Deposit()  
 {  
   auto int acc_no;  
   float add_money;  
   printf("Enter account number you want to deposit money:");  
   scanf("%d",&acc_no);  
   printf("\nThe current balance for account %d is %f \n",  
       acc_no, account[acc_no-1].available_balance);  
   printf("\nEnter money you want to deposit : ");  
   scanf("%f",&add_money);  
   while (acc_no=account[acc_no-1].acc_number)  
   {  
     account[acc_no-1].available_balance=  
       account[acc_no-1].available_balance+add_money;  
     printf("\nThe New balance for account %d is %f \n",  
         acc_no, account[acc_no-1].available_balance);  
     break;  
   }  
   acc_no++;  
   GotoMainMenu();  
 }  
 // Function to withdraw amount from an account  
 void Cash_withdrawl()  
 {  
   auto int acc_no;  
   float withdraw_money;  
   printf("Enter account number you want to withdraw money:");  
   scanf("%d",&acc_no);  
   printf("\nThe current balance for account %d is %f \n",  
       acc_no, account[acc_no-1].available_balance);  
   printf("\nEnter money you want to withdraw from account ");  
   scanf("%f",&withdraw_money);  
   while (acc_no=account[acc_no-1].acc_number)  
   {  
     account[acc_no-1].available_balance=  
       account[acc_no-1].available_balance-withdraw_money;  
     printf("\nThe New balance for account %d is %f \n",  
         acc_no, account[acc_no-1].available_balance);  
     break;  
   }  
   acc_no++;  
   GotoMainMenu();  
 }  
 // it will always call the main function to see menu  
 void GotoMainMenu()  
 {  
   int i; // local variable  
   printf("\n Please enter 1 to go main menu or 0 to exit the program.: ");  
   scanf("%d", &i);  
   if(i==1)  
   {  
     main(); // call main function  
   }  
   else if(i==0)  
   {  
     exit(0) ;// exit program  
   }  
   else  
   {  
     printf("\n You enter wrong , please enter either 0 or 1.");  
   }  
 }  


SQL Get all Index create script from Database

To get all script from database as a create new index into another database you can use the following --Get all Index Script SELECT...