SlideShare ist ein Scribd-Unternehmen logo
1 von 5
Downloaden Sie, um offline zu lesen
Di WebTech Mail - (no subject)                                         https://mail.google.com/mail/u/0/?ui=2&ik=f2506c64f4&view=pt&searc...




                                                                                     Ankur Kumar <akumar@diwebtech.com>



          (no subject)
          1 message

          Pankaj Sharma <pksharma@diwebtech.com>                                                   Tue, Jul 24, 2012 at 11:29 AM
          To: Ankur Kumar <akumar@diwebtech.com>

            using System;
            using System.Linq;
            using System.Web;
            using System.Web.Services;
            using System.Web.Services.Protocols;
            using System.Xml.Linq;
            using MySql.Data.MySqlClient;
            using System.Data;
            using System.Net;
            using System.IO;
            [WebService(Namespace = "http://rwa47.org/")]
            [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
            // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
            // [System.Web.Script.Services.ScriptService]

            public class Service : System.Web.Services.WebService
            {

              MySqlConnection connection = new MySqlConnection("server=localhost; user=root; password=123;
            database=easymoney");
              public Service()
              {

               }
               public struct RawDataEnq
               {
                 public String transdate;
                 public String usrtransid;
                 public String usrcity;
                 public String usrbank;
                 public String usrname;
                 public String usraccountno;
                 public String usramount;
               }
               public struct RawDataLogin
               {
                 public String id;
                 public bool result;

               }
               public struct RawData
               {
                 public String username;
                 public String amount;
                 public String type;
                 public String comment;
                 public String date;




1 of 5                                                                                                                     9/1/2012 8:24 PM
Di WebTech Mail - (no subject)                                          https://mail.google.com/mail/u/0/?ui=2&ik=f2506c64f4&view=pt&searc...



                   public String prevbal;
                   public String id;
                   public String time;

               }

               [WebMethod]
               public DataSet connectoToMySql()
               {
                 MySqlDataAdapter mysqlAdap = new MySqlDataAdapter("SELECT * FROM pankajku201235", connection);
                 DataSet ds = new DataSet();
                 mysqlAdap.Fill(ds, "users");
                 return ds;
               }
               [WebMethod]
               public RawDataLogin [] LoginCheck(string user_id, string user_pass)
               {

                 MySqlCommand mycommand = connection.CreateCommand();
                 connection.Open();
                 //mycommand.CommandText = "SELECT COUNT(*) FROM members where (username='" + user_id + "' and
            password='" + user_pass + "')";
                 //object scalar = mycommand.ExecuteScalar();
                 //int rows = int.Parse(scalar.ToString());
                 //mycommand.Dispose();
                 int i = 0;
                 mycommand.CommandText = "Select id,username,password from members where (username='" + user_id + "'
            and password='" + user_pass + "')";
                 RawDataLogin[] Data = new RawDataLogin[1];
                                                              )
                 MySqlDataAdapter myDA = new MySqlDataAdapter(mycommand);
                 MySqlDataReader reader = mycommand.ExecuteReader();
                 while (reader.Read())
                 {

                     if (user_id.Equals(reader.GetString(1).ToString()) && user_pass.Equals(reader.GetString(2).ToString()))
                     {
                         Data[i].id = reader.GetString(0).ToString();
                         Data[i].result = true;
                     }
                     else
                     {
                         Data[i].result = false ;
                     }
                   }
                   reader.Close();
                   return Data ;

               }
               [WebMethod]
               public RawData [] MyAccount(string user_id)
               {
                 MySqlCommand mycommand = connection.CreateCommand();
                 connection.Open();
                 mycommand.CommandText = "SELECT COUNT(*) FROM recharge where username='"+user_id +"'";
                 object scalar = mycommand.ExecuteScalar();
                 int rows = int.Parse(scalar.ToString());
                 mycommand.Dispose();
                 int i = 0;




2 of 5                                                                                                                      9/1/2012 8:24 PM
Di WebTech Mail - (no subject)                                     https://mail.google.com/mail/u/0/?ui=2&ik=f2506c64f4&view=pt&searc...



                 mycommand.CommandText = "Select * from recharge where username='" + user_id + "'";
                 RawData[] Data = new RawData[rows];
                 MySqlDataAdapter myDA = new MySqlDataAdapter(mycommand);
                 MySqlDataReader reader = mycommand.ExecuteReader();
                 while (reader.Read())
                 {
                    if (i < rows)
                    {
                        Data[i].username = reader.GetString(0).ToString();
                        Data[i].amount = reader.GetString(1).ToString();
                        Data[i].type = reader.GetString(2).ToString();
                        Data[i].comment = reader.GetString(3).ToString();
                        Data[i].date = reader.GetString(4).ToString();
                        Data[i].prevbal = reader.GetString(5).ToString();
                        Data[i].id = reader.GetString(6).ToString();
                        Data[i].time = reader.GetString(6).ToString();
                    }
                    i++;
                 }
                 reader.Close();
                 return Data;
               }
               [WebMethod]
               public RawDataEnq[] Enquiry(string user_id, DateTime start_date, DateTime end_date)
               {
                  MySqlCommand mycommand = connection.CreateCommand();
                  connection.Open();
                  mycommand.CommandText = "SELECT COUNT(*) FROM " + user_id + " where transdate between '" +
            start_date.Date.ToString("yyyy-MM-dd") + "' and '" + end_date.Date.ToString("yyyy-MM-dd") + "'";
                  object scalar = mycommand.ExecuteScalar();              6
                  int rows = int.Parse(scalar.ToString());
                  mycommand.Dispose();
                  int i = 0;
                  mycommand.CommandText = "Select transdate,usrtransid,usrcity,usrbank,usrname,usraccountno,usramount
            from " + user_id + " where transdate between '" + start_date.Date.ToString("yyyy-MM-dd") + "' and '" +
            end_date.Date.ToString("yyyy-MM-dd") + "'";
                  RawDataEnq[] Data = new RawDataEnq[rows];
                  MySqlDataAdapter myDA = new MySqlDataAdapter(mycommand);
                  MySqlDataReader reader = mycommand.ExecuteReader();
                  while (reader.Read())
                  {
                      if (i < rows)
                      {
                          Data[i].transdate = reader.GetString(0).ToString();
                          Data[i].usraccountno = reader.GetString(1).ToString();
                          Data[i].usramount = reader.GetString(2).ToString();
                          Data[i].usrbank = reader.GetString(3).ToString();
                          Data[i].usrcity = reader.GetString(4).ToString();
                          Data[i].usrname = reader.GetString(5).ToString();
                          Data[i].usrtransid = reader.GetString(6).ToString();

                    }
                    i++;
                 }
                 reader.Close();
                 return Data;




3 of 5                                                                                                                 9/1/2012 8:24 PM
Di WebTech Mail - (no subject)                                           https://mail.google.com/mail/u/0/?ui=2&ik=f2506c64f4&view=pt&searc...



               }
               [WebMethod]
               public bool ChangePassword(string user_id, string current_pass, string new_pass)
               {
                 MySqlCommand mycommand = connection.CreateCommand();
                 connection.Open();

                 mycommand.CommandText = "update members set password='" + new_pass + "' where username='" +
            user_id + "' and password='" + current_pass + "'";
                 mycommand.ExecuteNonQuery();
                 mycommand.Dispose();
                 bool result = false;
                 mycommand.CommandText = "Select username,password from members where (username='" + user_id + "')";
                 MySqlDataAdapter myDA = new MySqlDataAdapter(mycommand);
                 MySqlDataReader reader = mycommand.ExecuteReader();
                 while (reader.Read())
                 {
                    if (new_pass.Equals(reader.GetString(1).ToString()))
                        result = true;

                 }
                 reader.Close();
                 return result;
              }
              [WebMethod]
              public string MoneyTransfer(string user_id, string user_bank, string user_city, string user_name, string
            user_accountno, int user_amount)
              {
                 MySqlCommand mycommand = connection.CreateCommand();
                 connection.Open();                                    e
                 mycommand.CommandText = "Select afterbal from " + user_id + " ";
                 MySqlDataAdapter myDA = new MySqlDataAdapter(mycommand);
                 MySqlDataReader reader = mycommand.ExecuteReader();
                 int rows = 0;
                 while (reader.Read())
                 {
                     rows = int.Parse(reader.GetString(0).ToString());

                  }
                  int user_prevbal = rows;
                  int user_afterbal = rows - (user_amount + 50);
                  DateTime user_transdate = DateTime.Today;
                  DateTime user_transtime = DateTime.Now;
                  reader.Close();
                  mycommand.Dispose();
                  mycommand.CommandText = "insert into " + user_id + " (usrtransid,usrvoucherno,usrbank,usrstate,usrdistrict,
            usrcity,usrname,usraccountno,usramount,transdate,transtime,usrifsccode ,prevbal,afterbal) values(500,100,'" +
            user_bank + "','up','lko','" + user_city + "','" + user_name + "','" + user_accountno + "'," + user_amount + ",'" +
            user_transdate.Date.ToString("yyyy-MM-dd") + "','" + user_transtime.ToString("HH:mm:ss") + "','fdfd'," +
            user_prevbal + "," + user_afterbal + ")";
                  mycommand.ExecuteNonQuery();
                  mycommand.Dispose();
                  string s = "";
                  mycommand.CommandText = "Select usrname from " + user_id + " ";
                  MySqlDataAdapter myDA1 = new MySqlDataAdapter(mycommand);
                  MySqlDataReader reader1 = mycommand.ExecuteReader();
                  while (reader.Read())
                  {




4 of 5                                                                                                                       9/1/2012 8:24 PM
Di WebTech Mail - (no subject)                                         https://mail.google.com/mail/u/0/?ui=2&ik=f2506c64f4&view=pt&searc...



                      s = reader1.GetString(0).ToString();

                    }
                    reader1.Close();
                    return s;
                }
                [WebMethod]
                public string CurrentBalance(string user_id)
                {
                  string rows = "";
                  MySqlCommand mycommand = connection.CreateCommand();
                  connection.Open();
                  mycommand.CommandText = "Select afterbal from " + user_id + " ";
                  MySqlDataAdapter myDA = new MySqlDataAdapter(mycommand);
                  MySqlDataReader reader = mycommand.ExecuteReader();

                    while (reader.Read())
                    {
                      rows =reader.GetString(0).ToString();

                    }
                    reader.Close();
                    return rows;
                }
            }




                                                                   e




5 of 5                                                                                                                     9/1/2012 8:24 PM

Weitere ähnliche Inhalte

Was ist angesagt?

Indexing and Query Optimization
Indexing and Query OptimizationIndexing and Query Optimization
Indexing and Query OptimizationMongoDB
 
Indexing & Query Optimization
Indexing & Query OptimizationIndexing & Query Optimization
Indexing & Query OptimizationMongoDB
 
Reducing Development Time with MongoDB vs. SQL
Reducing Development Time with MongoDB vs. SQLReducing Development Time with MongoDB vs. SQL
Reducing Development Time with MongoDB vs. SQLMongoDB
 
Rapid and Scalable Development with MongoDB, PyMongo, and Ming
Rapid and Scalable Development with MongoDB, PyMongo, and MingRapid and Scalable Development with MongoDB, PyMongo, and Ming
Rapid and Scalable Development with MongoDB, PyMongo, and MingRick Copeland
 
Spring data presentation
Spring data presentationSpring data presentation
Spring data presentationOleksii Usyk
 
Tame Accidental Complexity with Ruby and MongoMapper
Tame Accidental Complexity with Ruby and MongoMapperTame Accidental Complexity with Ruby and MongoMapper
Tame Accidental Complexity with Ruby and MongoMapperGiordano Scalzo
 
MongoDB .local Houston 2019: Using Client Side Encryption in MongoDB 4.2
MongoDB .local Houston 2019: Using Client Side Encryption in MongoDB 4.2MongoDB .local Houston 2019: Using Client Side Encryption in MongoDB 4.2
MongoDB .local Houston 2019: Using Client Side Encryption in MongoDB 4.2MongoDB
 
MongoDB and PHP ZendCon 2011
MongoDB and PHP ZendCon 2011MongoDB and PHP ZendCon 2011
MongoDB and PHP ZendCon 2011Steven Francia
 
Paintfree Object-Document Mapping for MongoDB by Philipp Krenn
Paintfree Object-Document Mapping for MongoDB by Philipp KrennPaintfree Object-Document Mapping for MongoDB by Philipp Krenn
Paintfree Object-Document Mapping for MongoDB by Philipp KrennJavaDayUA
 
Data access 2.0? Please welcome: Spring Data!
Data access 2.0? Please welcome: Spring Data!Data access 2.0? Please welcome: Spring Data!
Data access 2.0? Please welcome: Spring Data!Oliver Gierke
 
The Principle of Hybrid App.
The Principle of Hybrid App.The Principle of Hybrid App.
The Principle of Hybrid App.musart Park
 
Mongo db tutorials
Mongo db tutorialsMongo db tutorials
Mongo db tutorialsAnuj Jain
 
An introduction into Spring Data
An introduction into Spring DataAn introduction into Spring Data
An introduction into Spring DataOliver Gierke
 
Knot.x: when Vert.x and RxJava meet
Knot.x: when Vert.x and RxJava meetKnot.x: when Vert.x and RxJava meet
Knot.x: when Vert.x and RxJava meetTomasz Michalak
 
Using Arbor/ RGraph JS libaries for Data Visualisation
Using Arbor/ RGraph JS libaries for Data VisualisationUsing Arbor/ RGraph JS libaries for Data Visualisation
Using Arbor/ RGraph JS libaries for Data VisualisationAlex Hardman
 
JavaEE 8 on a diet with Payara Micro 5
JavaEE 8 on a diet with Payara Micro 5JavaEE 8 on a diet with Payara Micro 5
JavaEE 8 on a diet with Payara Micro 5Payara
 
Learn Ajax here
Learn Ajax hereLearn Ajax here
Learn Ajax herejarnail
 

Was ist angesagt? (18)

Indexing and Query Optimization
Indexing and Query OptimizationIndexing and Query Optimization
Indexing and Query Optimization
 
Indexing & Query Optimization
Indexing & Query OptimizationIndexing & Query Optimization
Indexing & Query Optimization
 
Reducing Development Time with MongoDB vs. SQL
Reducing Development Time with MongoDB vs. SQLReducing Development Time with MongoDB vs. SQL
Reducing Development Time with MongoDB vs. SQL
 
Rapid and Scalable Development with MongoDB, PyMongo, and Ming
Rapid and Scalable Development with MongoDB, PyMongo, and MingRapid and Scalable Development with MongoDB, PyMongo, and Ming
Rapid and Scalable Development with MongoDB, PyMongo, and Ming
 
Spring data presentation
Spring data presentationSpring data presentation
Spring data presentation
 
Tame Accidental Complexity with Ruby and MongoMapper
Tame Accidental Complexity with Ruby and MongoMapperTame Accidental Complexity with Ruby and MongoMapper
Tame Accidental Complexity with Ruby and MongoMapper
 
MongoDB .local Houston 2019: Using Client Side Encryption in MongoDB 4.2
MongoDB .local Houston 2019: Using Client Side Encryption in MongoDB 4.2MongoDB .local Houston 2019: Using Client Side Encryption in MongoDB 4.2
MongoDB .local Houston 2019: Using Client Side Encryption in MongoDB 4.2
 
MongoDB and PHP ZendCon 2011
MongoDB and PHP ZendCon 2011MongoDB and PHP ZendCon 2011
MongoDB and PHP ZendCon 2011
 
Paintfree Object-Document Mapping for MongoDB by Philipp Krenn
Paintfree Object-Document Mapping for MongoDB by Philipp KrennPaintfree Object-Document Mapping for MongoDB by Philipp Krenn
Paintfree Object-Document Mapping for MongoDB by Philipp Krenn
 
Data access 2.0? Please welcome: Spring Data!
Data access 2.0? Please welcome: Spring Data!Data access 2.0? Please welcome: Spring Data!
Data access 2.0? Please welcome: Spring Data!
 
The Principle of Hybrid App.
The Principle of Hybrid App.The Principle of Hybrid App.
The Principle of Hybrid App.
 
Mongo db tutorials
Mongo db tutorialsMongo db tutorials
Mongo db tutorials
 
An introduction into Spring Data
An introduction into Spring DataAn introduction into Spring Data
An introduction into Spring Data
 
Knot.x: when Vert.x and RxJava meet
Knot.x: when Vert.x and RxJava meetKnot.x: when Vert.x and RxJava meet
Knot.x: when Vert.x and RxJava meet
 
Using Arbor/ RGraph JS libaries for Data Visualisation
Using Arbor/ RGraph JS libaries for Data VisualisationUsing Arbor/ RGraph JS libaries for Data Visualisation
Using Arbor/ RGraph JS libaries for Data Visualisation
 
JavaEE 8 on a diet with Payara Micro 5
JavaEE 8 on a diet with Payara Micro 5JavaEE 8 on a diet with Payara Micro 5
JavaEE 8 on a diet with Payara Micro 5
 
Mongo indexes
Mongo indexesMongo indexes
Mongo indexes
 
Learn Ajax here
Learn Ajax hereLearn Ajax here
Learn Ajax here
 

Ähnlich wie Di web tech mail (no subject)

Metaprogramming with JavaScript
Metaprogramming with JavaScriptMetaprogramming with JavaScript
Metaprogramming with JavaScriptTimur Shemsedinov
 
Mail OnLine Android Application at DroidCon - Turin - Italy
Mail OnLine Android Application at DroidCon - Turin - ItalyMail OnLine Android Application at DroidCon - Turin - Italy
Mail OnLine Android Application at DroidCon - Turin - ItalyYahoo
 
MongoDB dla administratora
MongoDB dla administratora MongoDB dla administratora
MongoDB dla administratora 3camp
 
Creating an Uber Clone - Part XII.pdf
Creating an Uber Clone - Part XII.pdfCreating an Uber Clone - Part XII.pdf
Creating an Uber Clone - Part XII.pdfShaiAlmog1
 
Simple.Data intro slides
Simple.Data intro slidesSimple.Data intro slides
Simple.Data intro slidesMark Rendle
 
Geneva JUG - Cassandra for Java Developers
Geneva JUG - Cassandra for Java DevelopersGeneva JUG - Cassandra for Java Developers
Geneva JUG - Cassandra for Java DevelopersMichaël Figuière
 
The State of JavaScript (2015)
The State of JavaScript (2015)The State of JavaScript (2015)
The State of JavaScript (2015)Domenic Denicola
 
New Features of JSR 317 (JPA 2.0)
New Features of JSR 317 (JPA 2.0)New Features of JSR 317 (JPA 2.0)
New Features of JSR 317 (JPA 2.0)Markus Eisele
 
TDD in the wild
TDD in the wildTDD in the wild
TDD in the wildBrainhub
 
Writing SOLID C++ [gbgcpp meetup @ Zenseact]
Writing SOLID C++ [gbgcpp meetup @ Zenseact]Writing SOLID C++ [gbgcpp meetup @ Zenseact]
Writing SOLID C++ [gbgcpp meetup @ Zenseact]Dimitrios Platis
 
nw-lab_dns-server.pdf
nw-lab_dns-server.pdfnw-lab_dns-server.pdf
nw-lab_dns-server.pdfJayaprasanna4
 
Developing Applications with MySQL and Java for beginners
Developing Applications with MySQL and Java for beginnersDeveloping Applications with MySQL and Java for beginners
Developing Applications with MySQL and Java for beginnersSaeid Zebardast
 
10 ways to make your code rock
10 ways to make your code rock10 ways to make your code rock
10 ways to make your code rockmartincronje
 
Android Architecture - Khoa Tran
Android Architecture -  Khoa TranAndroid Architecture -  Khoa Tran
Android Architecture - Khoa TranTu Le Dinh
 

Ähnlich wie Di web tech mail (no subject) (20)

greenDAO
greenDAOgreenDAO
greenDAO
 
Metaprogramming with JavaScript
Metaprogramming with JavaScriptMetaprogramming with JavaScript
Metaprogramming with JavaScript
 
Mail OnLine Android Application at DroidCon - Turin - Italy
Mail OnLine Android Application at DroidCon - Turin - ItalyMail OnLine Android Application at DroidCon - Turin - Italy
Mail OnLine Android Application at DroidCon - Turin - Italy
 
Ac2
Ac2Ac2
Ac2
 
MongoDB dla administratora
MongoDB dla administratora MongoDB dla administratora
MongoDB dla administratora
 
Anti patterns
Anti patternsAnti patterns
Anti patterns
 
Creating an Uber Clone - Part XII.pdf
Creating an Uber Clone - Part XII.pdfCreating an Uber Clone - Part XII.pdf
Creating an Uber Clone - Part XII.pdf
 
Simple.Data intro slides
Simple.Data intro slidesSimple.Data intro slides
Simple.Data intro slides
 
Mongo db dla administratora
Mongo db dla administratoraMongo db dla administratora
Mongo db dla administratora
 
Geneva JUG - Cassandra for Java Developers
Geneva JUG - Cassandra for Java DevelopersGeneva JUG - Cassandra for Java Developers
Geneva JUG - Cassandra for Java Developers
 
The State of JavaScript (2015)
The State of JavaScript (2015)The State of JavaScript (2015)
The State of JavaScript (2015)
 
New Features of JSR 317 (JPA 2.0)
New Features of JSR 317 (JPA 2.0)New Features of JSR 317 (JPA 2.0)
New Features of JSR 317 (JPA 2.0)
 
TDD in the wild
TDD in the wildTDD in the wild
TDD in the wild
 
Writing SOLID C++ [gbgcpp meetup @ Zenseact]
Writing SOLID C++ [gbgcpp meetup @ Zenseact]Writing SOLID C++ [gbgcpp meetup @ Zenseact]
Writing SOLID C++ [gbgcpp meetup @ Zenseact]
 
Xm lparsers
Xm lparsersXm lparsers
Xm lparsers
 
nw-lab_dns-server.pdf
nw-lab_dns-server.pdfnw-lab_dns-server.pdf
nw-lab_dns-server.pdf
 
Developing Applications with MySQL and Java for beginners
Developing Applications with MySQL and Java for beginnersDeveloping Applications with MySQL and Java for beginners
Developing Applications with MySQL and Java for beginners
 
10 ways to make your code rock
10 ways to make your code rock10 ways to make your code rock
10 ways to make your code rock
 
Database security
Database securityDatabase security
Database security
 
Android Architecture - Khoa Tran
Android Architecture -  Khoa TranAndroid Architecture -  Khoa Tran
Android Architecture - Khoa Tran
 

Kürzlich hochgeladen

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 

Kürzlich hochgeladen (20)

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 

Di web tech mail (no subject)

  • 1. Di WebTech Mail - (no subject) https://mail.google.com/mail/u/0/?ui=2&ik=f2506c64f4&view=pt&searc... Ankur Kumar <akumar@diwebtech.com> (no subject) 1 message Pankaj Sharma <pksharma@diwebtech.com> Tue, Jul 24, 2012 at 11:29 AM To: Ankur Kumar <akumar@diwebtech.com> using System; using System.Linq; using System.Web; using System.Web.Services; using System.Web.Services.Protocols; using System.Xml.Linq; using MySql.Data.MySqlClient; using System.Data; using System.Net; using System.IO; [WebService(Namespace = "http://rwa47.org/")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. // [System.Web.Script.Services.ScriptService] public class Service : System.Web.Services.WebService { MySqlConnection connection = new MySqlConnection("server=localhost; user=root; password=123; database=easymoney"); public Service() { } public struct RawDataEnq { public String transdate; public String usrtransid; public String usrcity; public String usrbank; public String usrname; public String usraccountno; public String usramount; } public struct RawDataLogin { public String id; public bool result; } public struct RawData { public String username; public String amount; public String type; public String comment; public String date; 1 of 5 9/1/2012 8:24 PM
  • 2. Di WebTech Mail - (no subject) https://mail.google.com/mail/u/0/?ui=2&ik=f2506c64f4&view=pt&searc... public String prevbal; public String id; public String time; } [WebMethod] public DataSet connectoToMySql() { MySqlDataAdapter mysqlAdap = new MySqlDataAdapter("SELECT * FROM pankajku201235", connection); DataSet ds = new DataSet(); mysqlAdap.Fill(ds, "users"); return ds; } [WebMethod] public RawDataLogin [] LoginCheck(string user_id, string user_pass) { MySqlCommand mycommand = connection.CreateCommand(); connection.Open(); //mycommand.CommandText = "SELECT COUNT(*) FROM members where (username='" + user_id + "' and password='" + user_pass + "')"; //object scalar = mycommand.ExecuteScalar(); //int rows = int.Parse(scalar.ToString()); //mycommand.Dispose(); int i = 0; mycommand.CommandText = "Select id,username,password from members where (username='" + user_id + "' and password='" + user_pass + "')"; RawDataLogin[] Data = new RawDataLogin[1]; ) MySqlDataAdapter myDA = new MySqlDataAdapter(mycommand); MySqlDataReader reader = mycommand.ExecuteReader(); while (reader.Read()) { if (user_id.Equals(reader.GetString(1).ToString()) && user_pass.Equals(reader.GetString(2).ToString())) { Data[i].id = reader.GetString(0).ToString(); Data[i].result = true; } else { Data[i].result = false ; } } reader.Close(); return Data ; } [WebMethod] public RawData [] MyAccount(string user_id) { MySqlCommand mycommand = connection.CreateCommand(); connection.Open(); mycommand.CommandText = "SELECT COUNT(*) FROM recharge where username='"+user_id +"'"; object scalar = mycommand.ExecuteScalar(); int rows = int.Parse(scalar.ToString()); mycommand.Dispose(); int i = 0; 2 of 5 9/1/2012 8:24 PM
  • 3. Di WebTech Mail - (no subject) https://mail.google.com/mail/u/0/?ui=2&ik=f2506c64f4&view=pt&searc... mycommand.CommandText = "Select * from recharge where username='" + user_id + "'"; RawData[] Data = new RawData[rows]; MySqlDataAdapter myDA = new MySqlDataAdapter(mycommand); MySqlDataReader reader = mycommand.ExecuteReader(); while (reader.Read()) { if (i < rows) { Data[i].username = reader.GetString(0).ToString(); Data[i].amount = reader.GetString(1).ToString(); Data[i].type = reader.GetString(2).ToString(); Data[i].comment = reader.GetString(3).ToString(); Data[i].date = reader.GetString(4).ToString(); Data[i].prevbal = reader.GetString(5).ToString(); Data[i].id = reader.GetString(6).ToString(); Data[i].time = reader.GetString(6).ToString(); } i++; } reader.Close(); return Data; } [WebMethod] public RawDataEnq[] Enquiry(string user_id, DateTime start_date, DateTime end_date) { MySqlCommand mycommand = connection.CreateCommand(); connection.Open(); mycommand.CommandText = "SELECT COUNT(*) FROM " + user_id + " where transdate between '" + start_date.Date.ToString("yyyy-MM-dd") + "' and '" + end_date.Date.ToString("yyyy-MM-dd") + "'"; object scalar = mycommand.ExecuteScalar(); 6 int rows = int.Parse(scalar.ToString()); mycommand.Dispose(); int i = 0; mycommand.CommandText = "Select transdate,usrtransid,usrcity,usrbank,usrname,usraccountno,usramount from " + user_id + " where transdate between '" + start_date.Date.ToString("yyyy-MM-dd") + "' and '" + end_date.Date.ToString("yyyy-MM-dd") + "'"; RawDataEnq[] Data = new RawDataEnq[rows]; MySqlDataAdapter myDA = new MySqlDataAdapter(mycommand); MySqlDataReader reader = mycommand.ExecuteReader(); while (reader.Read()) { if (i < rows) { Data[i].transdate = reader.GetString(0).ToString(); Data[i].usraccountno = reader.GetString(1).ToString(); Data[i].usramount = reader.GetString(2).ToString(); Data[i].usrbank = reader.GetString(3).ToString(); Data[i].usrcity = reader.GetString(4).ToString(); Data[i].usrname = reader.GetString(5).ToString(); Data[i].usrtransid = reader.GetString(6).ToString(); } i++; } reader.Close(); return Data; 3 of 5 9/1/2012 8:24 PM
  • 4. Di WebTech Mail - (no subject) https://mail.google.com/mail/u/0/?ui=2&ik=f2506c64f4&view=pt&searc... } [WebMethod] public bool ChangePassword(string user_id, string current_pass, string new_pass) { MySqlCommand mycommand = connection.CreateCommand(); connection.Open(); mycommand.CommandText = "update members set password='" + new_pass + "' where username='" + user_id + "' and password='" + current_pass + "'"; mycommand.ExecuteNonQuery(); mycommand.Dispose(); bool result = false; mycommand.CommandText = "Select username,password from members where (username='" + user_id + "')"; MySqlDataAdapter myDA = new MySqlDataAdapter(mycommand); MySqlDataReader reader = mycommand.ExecuteReader(); while (reader.Read()) { if (new_pass.Equals(reader.GetString(1).ToString())) result = true; } reader.Close(); return result; } [WebMethod] public string MoneyTransfer(string user_id, string user_bank, string user_city, string user_name, string user_accountno, int user_amount) { MySqlCommand mycommand = connection.CreateCommand(); connection.Open(); e mycommand.CommandText = "Select afterbal from " + user_id + " "; MySqlDataAdapter myDA = new MySqlDataAdapter(mycommand); MySqlDataReader reader = mycommand.ExecuteReader(); int rows = 0; while (reader.Read()) { rows = int.Parse(reader.GetString(0).ToString()); } int user_prevbal = rows; int user_afterbal = rows - (user_amount + 50); DateTime user_transdate = DateTime.Today; DateTime user_transtime = DateTime.Now; reader.Close(); mycommand.Dispose(); mycommand.CommandText = "insert into " + user_id + " (usrtransid,usrvoucherno,usrbank,usrstate,usrdistrict, usrcity,usrname,usraccountno,usramount,transdate,transtime,usrifsccode ,prevbal,afterbal) values(500,100,'" + user_bank + "','up','lko','" + user_city + "','" + user_name + "','" + user_accountno + "'," + user_amount + ",'" + user_transdate.Date.ToString("yyyy-MM-dd") + "','" + user_transtime.ToString("HH:mm:ss") + "','fdfd'," + user_prevbal + "," + user_afterbal + ")"; mycommand.ExecuteNonQuery(); mycommand.Dispose(); string s = ""; mycommand.CommandText = "Select usrname from " + user_id + " "; MySqlDataAdapter myDA1 = new MySqlDataAdapter(mycommand); MySqlDataReader reader1 = mycommand.ExecuteReader(); while (reader.Read()) { 4 of 5 9/1/2012 8:24 PM
  • 5. Di WebTech Mail - (no subject) https://mail.google.com/mail/u/0/?ui=2&ik=f2506c64f4&view=pt&searc... s = reader1.GetString(0).ToString(); } reader1.Close(); return s; } [WebMethod] public string CurrentBalance(string user_id) { string rows = ""; MySqlCommand mycommand = connection.CreateCommand(); connection.Open(); mycommand.CommandText = "Select afterbal from " + user_id + " "; MySqlDataAdapter myDA = new MySqlDataAdapter(mycommand); MySqlDataReader reader = mycommand.ExecuteReader(); while (reader.Read()) { rows =reader.GetString(0).ToString(); } reader.Close(); return rows; } } e 5 of 5 9/1/2012 8:24 PM