SlideShare une entreprise Scribd logo
1  sur  5
Télécharger pour lire hors ligne
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

Contenu connexe

Tendances

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
 

Tendances (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
 

Similaire à 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
 

Similaire à 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
 

Dernier

Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Bhuvaneswari Subramani
 

Dernier (20)

Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 

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