Friday, 1 December 2017

Learn Sql server in hindi/urdu part-16(String fucntions-2 IN SQL SERVER)





Select LTRIM('      Hello')





Select RTRIM (LTRIM('  Hello   '))



Select LOWER('CONVERT This String Into Lower Case')

Select UPPER('CONVERT This String Into Lower Case')

Select REVERSE('ABCDEFGHIJKLMNOPQRSTUVWXYZ')

Select LEN('ABCDEFGHIJKLMNOPQRSTUVWXYZ')


Learn Sql server in hindi/urdu part-15(String fucntions IN SQL SERVER)





use stringfunction





print ASCII('A')

print CHAR(51)









declare @number int

set @number=65

while(@number<=90)

begin



print CHAR(@number)



set @number=@number+1

end


Learn Sql server in hindi/urdu part-15(String fucntions IN SQL SERVER)





use stringfunction





print ASCII('A')

print CHAR(51)









declare @number int

set @number=65

while(@number<=90)

begin



print CHAR(@number)



set @number=@number+1

end


Monday, 27 November 2017

Learn Sql server in hindi/urdu part-14(Union and Union All)







--The UNION operator is used to combine the result-set of two or more SELECT statements.



--Each SELECT statement within UNION must have the same number of columns

--The columns must also have similar data types

--The columns in each SELECT statement must also be in the same order





create table tblIndiaCustomers

(

id int identity,

Name nvarchar(20),

email nvarchar(20)

)

create table tblUKCustomers

(

id int identity,

Name nvarchar(20),

email nvarchar(20)

)





insert into tblIndiaCustomers

values('Aditi','Aditi@yahoo.com')



insert into tblIndiaCustomers

values('Rahul','Rahul@yahoo.com')



insert into tblIndiaCustomers

values('Sundar','Sundar@yahoo.com')



insert into tblIndiaCustomers

values('Ganesh','Ganesh@yahoo.com')





----------------------------------------



insert into tblUKCustomers

values('Mark','Mark@hotmail.com')



insert into tblUKCustomers

values('Ben','Ben@hotmail.com')



insert into tblUKCustomers

values('Linda','Linda@hotmail.com')



insert into tblUKCustomers

values('Suzan','Suzan@hotmail.com')



----------------------------------





select * from tblIndiaCustomers

union

select * from tblUKCustomers





select * from tblIndiaCustomers

union all

select * from tblUKCustomers










Learn Sql server in hindi/urdu part-13 (Delete and Update using Store Pr...











create proc delete_employee

(

@emp_id int



)



as

begin



delete from employee where emp_id=@emp_id





end









execute delete_employee 3011













create proc  update_employee

(

@emp_id int,

@emp_salary int,

@emp_address nvarchar(100),

@emp_dept_id int



)

as

begin



update employee

set emp_salary=@emp_salary , emp_address=@emp_address ,dem_deptid=@emp_dept_id where emp_id=@emp_id





end



select * from employee





execute update_employee 2003,40000,'R-32 sector sec-11',2



Wednesday, 22 November 2017

Learn Sql server in hindi/urdu part-11(Group by in Sql server)







select  count(emp_id),emp_salary from employee group by emp_salary



select count(e.emp_id) as 'Total Employees', d.dept_name from employee e inner join department d on d.dept_id=e.dem_deptid

group by d.dept_name having  count(e.emp_id) >3

Tuesday, 21 November 2017

Snake Ladder Game in windows Form C# (PART-1)





Load event:
pictureBox3.Image
=
Image.FromFile(@"C:\Users\salman\Documents\Visual Studio
2013\Projects\WindowsFormsApplication3\WindowsFormsApplication3\Resources\roll.png"
);
           pictureBox3.SizeMode = PictureBoxSizeMode.StretchImage;

roll dice button:
label2.Text = logics.rolldice(pictureBox3).ToString();

class:
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WindowsFormsApplication3
{
    class logics
    {


        public static int rolldice(PictureBox px)
        {

            int dice = 0;
            Random r = new Random();
            dice = r.Next(1, 7);
            px.Image = Image.FromFile(@"C:\Users\salman\Documents\Visual Studio
2013\Projects\WindowsFormsApplication3\WindowsFormsApplication3\Resources\"
+ dice + ".png");
            px.SizeMode = PictureBoxSizeMode.StretchImage;

            return dice;
       
       
        } //roll dice
method end................



    }
}



Pass Dynamically Added Html Table Records List To Controller In Asp.net MVC

Controller Code: using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using ...