Tuesday, April 18, 2017

 Open PopUp Using JavaScript

 Open PopUp Using JavaScript




 function fnOpenPopUp() {
            var url = "PageAddress.aspx";
            newwindow = window.open(url, 'name', 'width=500, height=200');
            if (window.focus) { newwindow.focus() }
            function Openpopup(popurl) {
                newwindow = window.open(popurl, "", "width=500, height=200, left=45, top=15, scrollbars=no, menubar=no,resizable=no,directories=no,location=no")
            }
            return false;
        }

Monday, April 17, 2017

download file

   /****************************************************************/

        //download file

        /***************************************************************/
        function downloadJDFiles() {
            var fileName = document.getElementById('TxtJdDocPath').value;
            var pathFile = "/DocFile/" + fileName;

            $('#uploadedfiles').attr('href', pathFile);
        }


        function FinaldownloadJDFiles() {
            var Name = document.getElementById('lblFileUpload');
            var fileName = Name.innerHTML;
            var pathFile = "/DocFile/" + fileName;

            $('#Downloadfile').attr('href', pathFile);
        }

        function getfileUploadData(fileName) {
            document.getElementById('TxtJdDocPath').value = fileName;

        }

Tuesday, April 11, 2017

web.config

Web.Config

setting of web.config

<?xml version="1.0"?>



<configuration>


  <connectionStrings>
    <add name="ConnectionString" connectionString="Server=Localhost;userid=root;password=123;Database=ABCDataBase" providerName="MySql.Data.MySqlClient"/>
  </connectionStrings>
</configuration>

Wednesday, April 5, 2017

//--CREATE MAIN TABLE --//

//--CREATE MAIN TABLE --//


CREATE TABLE TEACHERLIST(
NAME VARCHAR(50),
QUALIFICATION VARCHAR(50),
ADD VARCHAR(50)
);

//-- CREATE TABLE WHERE TRIGGER AUTO FIRE ON CHANGE ON MAIN TABLE--//


CREATE TABLE TEACHERLISTOFFICE(
NAME VARCHAR(50),
QUALIFICATION VARCHAR(50),
ADD VARCHAR(50)
);

//------CREATE TRIGGER-----//



SYNTAX FOR INSERT:-


CREATE TRIGGER <TRIGGERNAME> AFTER INSERT ON <TABLENAME> FOR EACH ROW
BEGIN
  INSERT INTO <TABLENAME>
(<NAME_OF_COL_1>,<NAME_OF_COL_2>,<NAME_OF_COL_3>)
VALUES
(<VALUE_OF_COL_1>,<VALUE_OF_COL_1>,<VALUE_OF_COL_1>);

END


EXAMPLE:-


CREATE TRIGGER INSERTDATA AFTER INSERT ON TEACHERLIST FOR EACH ROW
BEGIN
INSERT INTO TEACHERLISTOFFICE
(NAME,QUALIFICATION,ADD) VALUES ('RAM','MBA','DELHI');
END

SYNTAX FOR UPDATE:-


CREATE TRIGGER <TRIGGERNAME> AFTER UPDATE ON <TABLENAME>
FOR EACH ROW
 BEGIN
UPDATE <TABLENAME>
SET
<NAME_OF_COL1>=NEW.<NAME_OF_COL1>
<NAME_OF_COL2>=NEW.<NAME_OF_COL2>
END



EXAMPLE:-


CREATE TRIGGER UPDATEDATA AFTER UPDATE ON TEACHERLIST
FOR EACH ROW
BEGIN
UPDATE TEACHERLISTOFFICE
SET
NAME=NEW.NAME,
QUALIFICATION=NEW.QUALIFICATION,
ADD=NEW.ADD;
END




//--CREATE STORE PROCEDURE--//



SYNTAX FOR STORE PROCEDURE:-

CREATE PROCEDURE <PROCEDURE_NAME>()
BEGIN
         ----WRITE SCRIPT HERE----
END


EXAMPLE OF STORE PROCEDURE:-


CREATE PROCEDURE GETDETAILS_TEACHER()
BEGIN
SELECT * FROM TEACHERLIST;
END


//-- CALLING OF STORE PROCEDURE --//


CALL <PROCEDURE_NAME>();



//--EXAMPLE OF CALLING OF STORE PROCEDURE--//


CALL GETDETAILS_TEACHER();

Thursday, March 23, 2017

Sample MYSQL Query 

                           Sample MYSQL Query 



/* Create database*/

create database demoDatabase;



/* Use database*/

use demoDatabase;





/* Create Table*/




create table employee (emp_Name varchar(50),emp_salary int(11));


/* description of Table*/



desc employee;



/* Insert data in Table*/

insert into employee (emp_name,emp_salary) values('Sonu',20000);

insert into employee (emp_name,emp_salary) values('Monu',2000);

insert into employee (emp_name,emp_salary) values('gita',10000);

insert into employee (emp_name,emp_salary) values('rita',1000);

insert into employee (emp_name,emp_salary) values('Sohan',200000);

insert into employee (emp_name,emp_salary) values('priyanshu',50000);

insert into employee (emp_name,emp_salary) values('Vickys',30000);


/* get all data from table*/

select * from employee;

















/* get Maximum Salary from the Table*/



select max(emp_salary) from employee;






/* get Minimum Salary from the Table*/

select min(emp_salary) from employee;






/* get Average Salary from the Table*/

select avg(emp_salary) from employee;







/* get Sum of Salary from the Table*/

select sum(emp_salary) from employee;






select emp_Name,emp_salary from employee where emp_salary in (1000,20000);



select emp_name,emp_salary from employee where emp_salary not in (1000,20000);



/* Search name which is started from S*/

select emp_name,emp_salary from employee where emp_Name like '%S';






/* Search name which is end with S*/

select emp_name,emp_salary from employee where emp_Name like 'S%';






/* Search name which has from S*/



select emp_name,emp_salary from employee where emp_Name like '%S%';

Sunday, February 26, 2017

Program for Create Table using C# Console Application

Program for Create Table using C# Console Application

Main Program



Output Screen