You are on page 1of 225

Topic 1. 2. 3. 4. Preface Objectives. System Analysis Feasibility Study • • • 5. 6. 7. 8.

Technical Feasibility Economical Feasibility Operational Feasibility

Page No. 1 3 14 19 20 23 26 29 32 35 39 56 60 67 259 261 263 292 297 308 310 313 317 322

Software Engineering Paradigm Software and Hardware Requirement Specifications Program Structure System Design • • DFDs Database Design & Normalization

9. 10. 11. 12. 13.

Coding Code Efficiency Optimization of Code Output Screens Implementation and Maintenance • Testing

14. 15. 16. 17. 18.

System Security Measures Cost Estimation of the Project PERT Chart, Gantt Chart Future Scope and further enhancement of the Project Bibliography

Due to the expantion of computers and its applications from large enterprises to the personal computers, the productivity of the concerned has been increased many folds. Today with the development of user-friendly software applications at a reasonable cost and its subsequent expansion as per the requirement has made many impossible tasks and complex topics possible with very little efforts. Today with the all round development in software, user friendly applications require an understanding for related terms such as intelligence, knowledge, reasoning, thought, cognition, learning and a number of computer related terms to develop an application which can be used in any required field with little or no knowledge. An ocean of data, details of complex data, reports and returns, records and updating with summary details are made available by AUTOMATION.

The software has been made users friendly where it does not require any expertise/training in operations. The proposed software has been developed by using C#.NET as front-end and SQL 2000 as back-end.

The objective of this project is to serve the maintain GUN STOCKS to provide better service to their customers by computerizing their complete process of billing and customer record related functions. These processes start from manage the stock of Gun House there are various type of gun avalabe such as Arms,Ammunation and Accessories. This Software has a part of tally and all expands related to the wappons. To develop our software, which will be used for projecting sales and revenue for forth coming years, the following are the main points to be considered:

1.

The proposed software is mainly developed for those Gun Houses which are exclusively dealing with customer oriented product sales.

2.

Generalized and customized software, which can be configured for large Gun Houses as well as small ones.

3.

To provide a tool that will monitor the sales team performance and activities that are carried on regular basis.

4.

To make available the analyzed data for orders received for various products during current/previous years.

Keeping following in view has also evolved the objective of the proposed project:

The Customer (Delar,Suppliers,Parties) details can be accessed through the DataBase, Party,Suppliers,Prodcutinsert tables respectively. It should maintain the records of the Stock about gun&wappons,Suppliers,party Region which is stored in the catagories of wappons.

 Increases the efficiency and effectiveness  Remove the Redundancies .  We maintain the records of the bill.  Report generation and printing. payment.  Prepare the bills for the customers & Receive the payment from the customer.  Enhancement of Reliability of the system. outstand & receipt.  Evaluate the performance of the system.  Calculate the outstanding bills & maintain the information about the receipts. Cash Flow Analysis of the organization.  System Administration & Project Security & Security of data.

and the problem of economy. The management has now decided to address the existing problems of the manual system and decided automization of the Organization. Due to which the profit of the Organization is reducing and has become the problem for the management. the problem of reliability. Careful analysis suggests a number of different problems. it is proposed that the existing manual methods for keeping the various data records of the Organization is problematic and existing infrastructure are not able to cope up with ever increasing expansion demand of the Organization.  Identification of the need For better understanding and assimilation of the proposed project. System analysis is an activity conducted with the following objectives:  Identify the customer’s need. without which it becomes impossible to specify the requirements for a new project with any accuracy. .  Perform economic and technical analysis.One of the most difficult tasks of system analysis is to develop a clear understanding of the problem being investigated. timeliness.  Evaluate the system concept for the feasibility. An organization combines policies. accuracy.  Establish cost and schedule constraints among others. validity. The adopted system should cover a very broad spectrum of requirement / concepts which mean an organized relationship among the functioning units or components to achieve the predetermined goals.

the hierarchical relationships starting with the President (owner) on the top and leading downwards. The analysis is required to find out exactly what must the system do? During analysis it attends to develop a complete functional understanding of the proposed system. equipment and computer facilities to co-ordinate the activities of an organization. For automization the records / requirements of the Medicos as proposed in this project. the system has been defined consisting of orderly grouping of inter dependent components linked together. They may be single computers with a keyboard. It is the arrangement of components that helps to achieve objectives. The component may be simple or complex.personnel. The objective is to define each of the logical function more correctly. for example. In the design of the automization. a central . memory and printer or a series of intelligent terminals linked to a mainframe. which must be performed by the system. basic or advanced. In either case each component is a part of the total system and has to do its own share of work for the system to achieve the desired goal. Basically an organization dealing with various activities represents an organized way of achieving the predetermined objectives of an organization. Accordingly the above system is designed around an input device. Following characteristics of a system have been considered for the proposed project: - Organization Growth: Organization implies structure and order. The document identifies a number of function or processes.

an output device and one or more storage units. . they work as a whole system for generating information. ‘When these units are linked together.processing unit.

Some of the functions are very difficult to be monitored manually. . For e.Efficiency in managing business: An efficient system is a system. which are very critical to the organization.g. Resource planning assumes greater importance and the management would need timely information about organization. which gives us right information at right time. These critical functions or business processes need to be run efficiently and effectively so that the management can focus on process improvements and employee satisfaction. Need to manage business critical functions: There are various functions. the processing of insertion & leave information of canteen order is very important for the organization as it helps in structuring the canteen.

It is the collecting of information that helps the team members in evaluating the merits of the project request and thus make an informed judgement about the feasibility of the proposed project. We reviewed the working of the different departments of the organization and who are the persons directly associated with the departments who are going to interact with the system. Reviewing organization documents: Firstly we have to learn about the organization involved in or affected by the project. . For this proposed system we have done some preliminary investigation and gathered data through primary methods.Preliminary investigation The first step in the system development life cycle is the preliminary investigation.

operationally and technically. but they do not include enough details for a decision to be made. Sometimes we also conducted interviews to provide details that further explained the project and show whether assistance is merited economically. the work load of the system and the users. methods of work and the facilities provided by the organization to the users. Conducting interviews: The last two techniques tell us how the system should operate. .On site observations: In this process we monitored the office environment. We prepared a questionnaire for the users of the proposed system to learn more about the nature of the project request and the depth to which users may retrieve information from it. The purpose of on site observation is to get as specific as possible to the real system being studied.

The implementation team is well equipped to develop the solution and the management has agreed to provide the infrastructure need. Does the proposed system have the technical capacity to hold the data required? This system is going to hold a large database.FEASIBILITY STUDY Preliminary investigation examines project feasibility. which can store as much data as required by the business. the likelihood of the system being useful to the organization. The feasibility studies may be carried out in three phases:  Technical Feasibility  Operational Feasibility  Economic Feasibility Technical feasibility: There are a number of technical issues that are generally raised during the feasibility stage of the investigation. This would hold good for branches and should Canteen Management System look to open more branches they would need to add hard disks and RAM to scale up the application. Is it technically possible to develop the system? This Canteen Management system is technically feasible within existing technologies. .

How far the proposed system gives technical guarantees of accuracy. This is an ongoing effort that improves in accuracy at each phase of the system life cycle. reliability. More commonly known as cost/benefit analysis. ease of access and data security? This system guarantees the accuracy. Module upgrade is possible as and when the functioning of any department changes. ease of access and security of data at all times as different validations and retrieval checks will be performed before submitting or retrieving any information. Can the system be upgraded? The scope of the system goes far beyond the expectations because as the organization grows and the functions grow respectively. reliability. then the decision is made to design and implement the system. the procedure is to determine the benefits and savings that are expected from a candidate system and compare them with costs. Economic feasibility: Economic analysis is the most frequently used method for evaluating the effectiveness of a candidate system. . If benefits outweight costs. This would be sufficiently tested and validated during the testing phase and implementation team would seek a sign off on the functionality of the system.

and better business decisions through reformatted and pre-analyzed sales data).  To get the management approvals. In a nutshell the following steps are to be followed:  To study the existing system.COST-BENEFIT ANALYSIS Cost-benefit analysis is complicated by criteria that vary with the characteristics of the system to be developed. Direct quantities comparisons may be difficulty to achieve.  To study the strengths and weakness of the existing system. the relative size of the project. .  To carry out feasibility studies.  To study various alternatives. better design quality through iterative intimation.g. and the expected return on investment desired as part of a company’s strategic plan. increased customer satisfaction through programmable control.  To define the scope of the proposed system. In addition many benefits derived from computer-based systems are ignitable (e.

Will it produce efficient result? Will the performance of plant fall down after implementation? The genuine concerns about the proposed system pertain to how would a person be able to quickly adapt to a new system. useful information as and when required.Operational feasibility: Proposed Systems are beneficial only if they can be termed into information systems that will meet the operating requirements of the organization. . Is there sufficient support for the proposed system from the management and users? This is an important question that would help us perceive any resistance that might come from the end user community. Are current business methods not acceptable to the users? Are they ready to embrace a change bringing about a more operational and useful system? The end user community was tired getting a lashing from their management that they are not providing right and the accurate information. However. This test of feasibility asks if the system will work when it is developed and installed. Implementation team proposed an extensive training plan to address this concern and also assured them 2 weeks of post implementation support. Canteen Management System is committed to this project and is highly supportive. the problem of timeliness still persists. The users of the proposed system welcomed the change as they knew that the new system would bring right. The important questions useful to test the operational feasibility of a project are as under. They have spent countless nights in re-working to provide accurate information. There was no resistance from the organization for the proposed system as they were happy to learn that the manual system is being automated.

and the controls and deliverables that are required. It begins with requirements gathering. A “quick design” is then visible to the user which further leads to the construction of a prototype. Management. queries regarding of the actual problem . For this system we are incorporating all the methods. We met the users of the system and defined the overall objectives for the software. Therefore System Analysis is concerned with the study of existing systems and Procedures and identification of the requirements of proposed system. the methods and tools to be used. SOFTWARE ENGINEERING PARADIGM To solve actual problems we incorporate a development strategy that encompasses the process. This Prototype is evaluated by the customer interactively which enables the developer to better understand what needs to be done. The prototype can serve as “ . methods and tool layers referred to as a process model of a software-engineering paradigm. Legal and Time Feasibility of the proposed system has also been checked to find the above aspect of the system. A process model for software engineering is chosen based on the nature of the project and application. the problems encountered in the presently available system are also discovered.Other feasibility: Like Social. processes and tools using prototyping paradigm. In this phase. identify whatever requirements are known and outline areas where further definition is mandatory.

The prototyping paradigm: Listen to Customer Build/Revise Mock-up Customer test-drives mock .the first system ”. The function and performance allocated to various software as establishing by developing a detailed validation criteria as per the following refines part of system engineering: - .up The software requirement specification is produced at the culmination of the analysis task. Users get a feel for the actual system and the developers get to build same thing immediately.

C#.HARDWARE USED Pentium IV.NET(As front-end) SQL-2000(As back-end) . 512 MB RAM 160 GB Hard Disk SOFTWARE USED Windows XP and Above.

System should capable for these requirements which is necessary for checking the order of stock.  System should capable for maintaining the payment which is collected by the customer and calculate the balance of the customer. deletion of the Gun House.Ammunation & Accessories(Gun. Maintain the Order No. Client. & Order Date. supplement. Following are the basic requirements of Canteen Management system:  Maintain the customer such as Delars. modification. booking Stock. Organization should generate the bill after Order of the Gun House.Revolver.    Maintain the information about the product.Rifle). the introduction may be nothing more than the software scope of planning document for the modules.  Manage the different type of the customer & maintain the database of the customer.  Define the category of the Wappons such as Arms. describing it in the context of the computer –based system.SOFTWARE REQUIREMENTS SPECIFICATIONS The introduction of the software requirements specification states the goals and objectives of the software. Representative and check these information. However.  System should capable to generate the receipt for the customer. unit.Pistole.   Maintain the records of insertion. .

Dues. Customer can be Delar. The information Description: It provides a detailed description of the problem that must solve. In the proposed system the requirement has been collected from the user as well as from the existing systems keeping in view of the future advancement and its expansion. flow. Stock.Consignment. Hardware. Representative. software. receipt. payment. System should capable to generate the different reports which is useful for showing the relative information about the customer. Information content. date wise product.  Administrator module manage all the master like Unit. Bharat Gun House process the following steps:  First of all enter the Login name &Password. Received from the party.Return Consignment. bill.  In customer module insertion of the new customer.Reports Daily saling & purchaseing.  Administrator maintain the database of these masters. Transfer to other party. and human interfaces are described for external system elements and internal software function.All Updation & Deletion part of the Bharat Gun House. Client.There are two type of Login Administrator & User. . and structure are documented.

deletion. situation of the page. Gun House category. Order date of Gun House. unit. Insertion. DD.    In Order module receive the Order from the different type of customer.  After completing all these work generate the reports like product. product. Number of Modules: According to the Structure chart this System is primarily divided into Number of modules and these modules are further divided into sub modules where required to design the objective efficiently.  Operator prepare the canteen’s bill for the customer after some checking.  In the Payment module we check the payment of the bill in different manner such as collection of payment & balance of the customer. Bharat Gun House software contains the following modules: Module 1: . receipt.  Customer payment the bill which generated by the organization. Operator checks all the entries like unit. Cheque. receipt date. modification of the customer & maintain the records of the customer.  In the Receipt module after checking all these entries opreator generate the bill receipt.  Operator maintain the premium & discount according to the advertisement category.  Customer can pay these Payments by different type like Cash. bill. location. After checking these entries Administrator generate the Order no.  Bill receipt contain the receipt no. color. receipt amount. payment.

accessories.  Received own data to other Party.accessories.Market price.Purchase price. They are used to enter all information of Wappons. This module is used to provide the information Received & Given consignment to othesr and ourself also.Company.pistol).Accessories.Producttype.Type. Show all Record on the basis of Arms(gun. Ammunation(gun. Module 2: Consignment Module:    Received Consignment from other Party.rifle.ArmsNo..accessories.  Record all the received and given consignment to other and ourself also.  Given Own data to other Party.  Update or delete Consignment record.pistol) .pistole).QTY.Location.rifle. Update and Delete of Gun Stock. Module 3: . Administrative Module represents information of all Wappons like Classification. Maintain the Party information.rifle.Gun Stock Module:    Insertion of new Gun Stock such as Arms.Accessories(gun.Rifle.Bore.Pistole. Maintain the category of Products such as Arms & Ammunation.  Return the Consignment to the party.Variety.

 Update & Delete these profile.  Update/Delete . Update & Delete purchased data if any entry is wrong.  Billing on two basis Bill/Invoice or Cash Memo  Module 5: Repair Module:   Received Arms & Ammunation for repairing.  Maintain the Category of Add. This module is used to provide the information daily purchased data & and provide the information about Suppliers & Party. Add New Party & Suppliers.Purchase Module:    Add purchased data in the stock through the purchased from.  Maintain the day for Add.  Describing the repair type of the product. Module 4: Sale Module:  Maintain the Order Date.  Product sale &Billing.  Maintain the record of customer.  Maintain the Category of Add.

 Dues remaining over others Check Account. representative (group) during the current financial year.  Consignment reports. Return to the party after repairing the product &maintaining the Account of that party on the basis of payable.  Repair reports.  Account reports.  Daily Police report.  Module 6: Reports Module:   Stock Reports. Daily saling products due .  Module 7: Dues Module:   Dues remaining over gun house check Account. This module provide the information about all type of working of this software in the form of crystalreports.  Daily Purchased reports.  Daily Sale reports. Item.received&due amount.  Update/Delete. This module is used to provide the detail that have been taken by customer.received & payable Amount. .

Behavioral Description of the specification examines the operation of the software as a consequence of external events and internally generated control characteristics. .This module provide the information about account information. This also used to provide processing narrative for each function. Validation Criteria is probably the most important section of the Software. design constraints with justification and performance characteristics. Functional Description: It describes the details of each function which have been used to solve the problem has been presented.

Database management systems the programs that organize and maintain the information whereas the database application is the program that let us view. DBMS has to protect database against unintentional that could be caused by the users and application like disk crack etc and in case of multiuser system.SQL-2005 and INFORMIX etc. The most famous RDBMS packages are SQL-2000. it must be capable of notifying any database change to the other user Characteristics of A Database Management System:  It represents complex relationship between data. retrieve and update information stored in DBMS. Database system supports single user and multi-user. The primary objective of DBMS is to provide a convenient environment to retrieve and store database information. While DBMS let only one person to access data. What Is Database Management System? A database management system is essentially a collection of interrelated data and set of programs to access this data. For this software we preferred SQL-2000 as our backend tool.SQL2000. SYBASE. The collection of data is called DATABASE. A Database consists of two parts namely the database management and the database application. .An overview of RDBMS RDBMS is the acronym for the relational database management system. Enforces user-defined rules to ensure the integrity of table data. The concept of relational database is known since 1980 the idea of database management system is quit old. Keep a tight control of data redundancy.

Data Manipulation: Allows data in the database to be inserted. intelligent back up and recovery procedures for data. With more and more people accessing this data for their work. This ensures the accuracy of the data. This organized fashion normally involves storing the data in the form of TABLES. Has automatic. Enforces data access authorization.Has centralized data dictionary for the storage of information pertaining to data and its manipulation Ensures that data can be shared across authorization. today it is possible to maintain data pertaining to any operation with security. which holds data in the form of rows . A table is a unit of storage. deleted and stored Data Display: Data Integrity: This helps in viewing data. A database is an aggregation of data in contiguous locations in some organized fashion. the chances that the data loses its integrity and validity are very high. Have different interfaces which users can manipulate data. Normally with the traditional methods of storing data and information in files. It checks whether each record has fields containing all information about one particular item. they need to maintain its integrity. With the birth of new concepts of data storage and manipulation known as DATABASE” and “DATABASE MANAGEMENT”. updated. Database Management System Offers the Following Services: Data Definition: Data Maintenance: It is a method of data definition and storage. Introduction to SQL-2000: Every business enterprise maintains large volumes of data for its operation. relevance increases.

Thus a collections of all tables with their interrelationships could be termed as database. A large table that is partitioned can enhance the performance because accessing can be done on Multipartition in parallel. SQL2000 supports very large database that could contain hundreds of terabytes of information.and columns. SQL-2000 data partitioning features helps to minimize the problems. I addition. acceptable at the same time for transactions. These features allow multiple executions. . SQL-2000 has advance queuing features. Even if one or more partitions fail then the partitions are available to applications. The DBMS whose designs are based on the relational theory in mathematics is called the Relational Database Management System or RDBMS. SQL-2000 supports Multi Thread Servers (MTS). Individual table can now have up to one thousand. SQL-2000 database offers capabilities of both relational & object oriented database systems. It can support ten times the amounts of data. the database can now support very large objects known as LOBS. A program or “Software” that can help us to access this data and perform certain pre defined operations on it. It also provides access to many concurrent users to the of thousands or ten thousand users. SQL-2000 is an Object Relational Database Management System (ORDBMS). SQL-2000 provides ten fold size improvements. is called a DATABASE MANAGEMENT SYSTEM or a DBMS.

Through SQL*PLUS we can store. Disk mirroring. Password expiration and forced password changes. Password history maintenance to prevent users from reusing previous passwords. SQL-2000 now offers most of the features that most operating systems have had for years Account disablement after a specified number of failed attempts.SQL-2000's reliability is built around technologies such as: The SQL-2000 parallel server product. SQL*PLUS SQL*PLUS is a structured query language supported by SQL-2000. retrieve. edit. Complex password enforcement that forces users to choose passwords which cannot easily be guessed by potential intruders. They are SQL* PLUS. Using SQL*PLUS we can also format query results in the form of report. Fast and simple recovery mechanisms. Tools of SQL-2000: The tools of SQL-2000 are so user friendly that a person with minimum skills in the field of computers can access. enter and run SQL commands and PL/SQL blocks. FORMS. PL/SQL. REPORTS. .

).PL/SQL PL/SQL is an extension of SQL. executing. Forms This tool is used for generating and executing forms based applications.... First of all. yet easy to use. ... PL/SQL block can contain any number of SQL statements integrated with flow of control statements.. A form basically comprises blocks and fields. which are explained later in this section. Multiple tables can be accessed over a single form. SQL-2000 reports are powerful... Reports It is an application development tool of SQL-2000 for developing.. based on the application with help of transaction commands. Thus PL/SQL combines the data manipulating power of SQL with data processing power of procedural language. Creation of Database: This section consists of a list of Application related tables. and printing reports.. <column2><type>. Tables are created using the SQL command. CREATE and some constraints are applied on it. Create Command The syntax of CREATE command is as follows: CREATE table <table-name> (<column 1><type>... CREATE command is a part of DATA Definition Language (DDL) which is used for creating the tables for data storage.. displaying.

it is said to be a Composite key. we make use of referential integrity constraint. when enforced in a column or set of columns. Insert Command . As a result it is used to identify a row. Primary Key This constraint avoids duplication of rows and does not allow NULL values. we should define the column in the parent table as a primary key and the same column in the child table as a foreign key referring to the corresponding parent entry. If primary key constraints are assigned to a combination of columns. The index points directly to the location of the rows containing the values. We create an index on a column or a combination of columns using CREATE INDEX command. foreign key. the constraints used are Primary Key. Referential Integrity Constraints To establish a 'parent-child' or a 'master detail' relationship between two tables having a common column. To implement this. Index We create indexes explicitly to speed up SQL statement on a table. Referential integrity constraints. which can contain a maximum of 16 columns. and indexes. Foreign Key This constraint helps to understand the relationship between tables.For each table.

... ‘&CTG _code’.... column_name2.. Example Insert into CTG_MASTER values (‘CTG00011’.from table_name1. which satisfy the ‘Where’. column2.... ‘&CTG _Name’.WHERE conditions [order by].. To understand this..... INSERT command of Data Manipulation Language (DML) is used to insert records into the table.... use the following insert command: INSERT into CTG_MASTER values (‘&CTG_ID’.. To arrange the displayed rows according to some predefined order we can use the ‘order by’ clause.... The values are separated by commas and must be entered in the same order as they are defined in the table.).... The syntax for SELECT command along with the WHERE clause is given below: SELECT column1.. The ‘order by’ clause should be the last clause in a select command. ... We can retrieve only the rows.Once the table is created..’DISPLAY’). If you want to insert another records in the same table just write run or type / Run command is used for executing previous command...from table_name. Select Command Select command is used to retrieve records from the table The syntax of SELECT command is as follows: SELECT column_name1. To select specific row from a table we include a ‘Where’ clause in the select command.. If a user wants to enter 100 records then he has to write insert statement 100 times. ‘DIS’.. condition... The syntax of INSERT command is as follows: INSERT into <table-name> values (list of data values).. He can avoid this by making use of substitution variable.

The Table list briefly describes each of the tables and can be used to quickly identify tables for which details are required. Why opt C#. For each table.NET" refers to the method used to create the graphical user interface (GUI).NET has the tools we need. It is referred to as the integrated development environment or IDE because it integrates many different functions such as design.NET. compiling. It makes the work of a Developer a lot easier. . C#.Table Descriptions and Validations This section consists of a list of the Application related tables. User Controls etc. It also gives a detailed description of each column and its characteristics.cab files. Which makes system more elegant & user-friendly even for non-computer literate. forms.NET The "C#. Integrated Development Environment (IDE) makes it easy for the Developer to manage classes. It further contains detailed definitions of the underlying tables. a large enterprise-wide system. Whether our goal is to create a small utility for our self or our work group. foreign keys. Package and Deployment Tool The Package and Deployment Wizard automates many of the steps involved in distributing applications by presenting you with choices about how you want to configure your . and debugging within a common environment. Introduction to C#. editing. and indexes. or even distributed applications spanning the globe via the Internet. it provides information about primary keys.NET: GUI Tool used in the Development of this project is Microsoft Developer Studio’s C#. modules.

rpdues . Finished application is a true .SqlClient.ConnectionString = "data source=.Data.slimit. com = new System. .Data. including Microsoft SQL Server.Connection = con. You can use this object to connect to a data source such as SQL-2000. front-end applications.SqlConnection(). static db() { con = new System.exe file that uses a C#.SqlCommand com.stgunid. public static System. A Connection Object is created using the create Object method of the Server object. } } Connection object allows commands to be executed using the Execute method.bhdues.customername.SqlDataReader dr.Open(). public static string gunid.initial catalog=bharat.prona.Data.Data.. public static int sid.str2.licenceno. class db { public static System.SqlClient.SqlClient. Connection Represents a unique session with a data source.SqlClient.SqlCommand(). public static System. Internet capabilities make it easy to provide access to documents and applications across the Internet or Intranet from within our application.comna. The Execute command returns a Recordset object.Data access features allow us to create databases. or to create Internet server applications. SQL Server or Access or even Microsoft Excel spreadsheet.str1. com.NET Virtual Machine that can be freely distributed. SQL-2000 and other enterprise-level databases.SqlConnection con.integrated security=true".Data. and scalable server-side components for most popular database formats. con.SqlClient. con.

It requires a careful planning and logical thinking on part of the system designer upmost care should be taken because if this phase contains any errors then it will effect the performance of the system.Level Design ) focuses on the types of modules needed for the system and how these modules need to be interconnected. a database. The Detailed Design Level ( or the Logic Design ) focuses. The designing part has essentially two levels: System Design Level  Detailed Design Level The System Design Level ( or the Top. System designs build information gathered during the system analysis.e. how the specifications of the module can be satisfied. System design is the creative act of invention. Designing is the most important part of the software development. internal design of modules are specified i. which interact with each other to produce some services. developing new inputs. . A system can be a collection of componentes with clearly defined behavior. offline files. procedures and output for processing business data to meet organization objectives. method.Introduction: The design of a system is essentilly a blueprint or a plan for a solution for the system.

Reliability To avoid the errors inherent in the manual system and to generate consistent and reliable outputs. modules . Efficiency The system should utilize all the scarce and expensive resources efficiently.Design objective: The goal of the system design is not simply to produce a design but to find the best possible design . User-Friendliness To make the system completely menu driven and hence user friendly in order to aid the users . all relevant data structures . Some of the desirable properties for a software design are: Verifiability The system design should be correct such that its correctness can be verified. Completeness All different components of design should be specified. A system should be developed such as to impose a little job on the maintenance and upgradation phase. or users unfamiliar with the knowledge of computers. . within the limitations imposed by the requirements and the physical and social environment in which the system will operate. external interfaces and module interconnections are specified. Avoid Redundancy & Maintain Consistency To design the system in such a way so as to reduce redundant information and to maintain consistency of information in the system. Simplicity & understandability This is the most important aspect of the quality consideration. that is .

Input Design
Inaccurate input data are the most common cause of errors in data processing. Errors can be controlled while input design. The goal of designing input data is to make data entry as easy, logical and error free as possible. While designing the forms where the user inputs the data care should be taken about the following points. The allocated space for each field. Only a single dot can be accepted in amount type fields Field sequence that must match that in the source document. The format in which the data fields are entered; for example:-filling out the date field is required through the edited format MM-DD-YY

Database Design
A well designed database makes programming and tuning application much easier. A logical database design is typically a block diagram of entities and relationships. Referred to as an E-R Diagram. Relational database uses a term Entity to represent and object in the logical design and attribute to represent properties of the entities. For example the tables in our database are entities and field in each table are attributes of each entities.

Logical design creating all entities in the database and establishing relationship between entities. Logical design does not take in to account the type of database or the system on which the database with besides. Physical database design is taking the logical database and creating with database and database object to represent the entities and relationship in

the logical database design. In the physical design each entity become a table and the attribute of the entities become column of the tables.

Database Design Goals :It is important to understand some of the goal before beginning the process of designing a database. The design goals for logical database are: Establish database purpose Support all Queries and produce all reports Be-able to perform all calculation Process all transactions Enforce restrictions and Defaults

Database Designing Process: Retrieving Information and Analyzing Information:The first step in designing a database is to talk to people who will use it. Gather all information to be represented in your database. Gather all the reports generated by hand that you expect with the database. Add in new report that the user want. Gather any information sheets and any available information on the data and there characteristics.

Break Down Information Into Separate entities :Get a piece of paper or a database design tool and break down the collected data items, collected into separate entities. An entity is a distinct object in the database. Each entity becomes its own table.

Assigning Attributes to each Entity:When you have created separate entities for each object, assign attributes to each entity. An attribute is property or characteristic of the object, such as its name, address etc. Each attribute becomes the fields in the table.

Identify a Unique Identifier for each entity:A row in a relational database needs to be uniquely identified so you can retrieve that row and only one row. Select one or more attributes that are uniquely identified a single row in the entity. This unique identifier is called Primary Key.

Establish Relationship Among Entities:Determine the types of relationship that exists among your entities. There are three types of relationship in relational database design:

One-to-One One-to-Many Many-to-Many

One-to-One

A One-to-One relationship is one in which each row in one table

represented by a single row in another table. One-to-Many A One-to-Many relationship is one in which a row in one table may be represented by many rows in another table.

Many-to-Many A Many-to-Many relationship is one in which arrow from one entity may be represented by one or many row in another table and a row from second table may be represented by One-to-Many row in the first table.

Normalization of the Logical Design: When you have established relationship for your logical design, to normalize the design. Normalization involves a set of rules used to test the soundness of your database design. Each rule applied to the logical database design , then the logical design said to be in rule# form. For which rule# is first, second, third and so on to fifth.

All Database Management Systems allow users to create containers for data storage and management. Field Length : This is the manner we ‘Rigidize’ free from human data. . to manage human data. Traditionally.Table Design: Any Programming environment to create containers. in very simple terms these programming environments can be conceptualized as database management system. We create container of a pre-determined length into which we will store ‘Free Form’ human data for management. The minimum information that has to be given to the DBMS for a suitable container to be constructed which can hold free from human data is:Field Name Field Length The type of data that can be placed in to the Field Field Name : When we wish to view the contents of the field later all we need to do is to tell the programming environment the field name. We will have to try our best and decide the longest name we wish to manage and decide on the container length accordingly. These containers are called ‘Field’. the block of human data being managed is called a Database. The programming environment is intelligent enough to fetch for us contents of the field. can be conceptualized as Data Management System. Hence.

what kind of data we will store in the field when it is being used. The simplest reason being that we would have to separate character and number data types. Multiple field placed in the same horizontal plane is an object Wing called ‘Record’ by RDBMS severalHas records of equal length placed one below the other to Customer Designation enable user to continue to store data is called ‘Table’. which is creating field for us. Has Has Department M Purchase Has 1 1 Employee Purchase Organization Has Has M Item Contain Group Has Section Contain Stock Attendance Salary Receives Entity relationship diagram . We would then have to inform the programming environment. We would imagine that each field was an object created us by the RDBMS.Field Data Type : Human data is mainly of two type character or numeric if numbers then we can have whole number or floats. Then the fields create for us in the same horizontal plane would be another distinct object created for us by RDBMS.

.

DFD Cust_Info Consumer / Client Receipt / Goods Emp_Info Report Data Management CMS Employee Salary Zero Level DFD .

Customer Cust Info Cust Info (1) Processing of Customer Data. Cust Info Customer Data Order Info Receipt / Goods (2) Order Processing Order Info Orders Data Cust Info Attendance Table Salary Details Report Data Management (3) Generate Reports Sale Info Sale Table (4) Gives Payments Emp Info Employee (5) Varifies Attendance Attendance Info Emp Info (6) Salary Info Calculate Salary Salary Info .

2) Varchar2(10) Date Date Date Not Null Foreign Key Foreign Key Remark Primary Key Not Null Foreign Key Not Null . Field Cust_Id Cust_Name Desig_Id Address Unit Status Phone Dob Liquor_Quota Wing_Id Dept_No NoOfPerson Income Card_No Issued_On Valid_Up_To Renewed_Up_To DataType Varchar2(10) Varchar2(20) Varchar2(10) Varchar2 (50) Varchar2(4) Varchar2(2) Varchar2(50) Date Number(4) Varchar2(10) Varchar2(10) Number(2) Number(10.Tables Description: Table Name : Customer Purpose : Table to store the Information about the Customer.

2) Varchar2(10) Not Null Foreign Key Remark Primary Key Not Null . Field Item_Id Item_Name 0Item_Desc Item_Price Group_Id DataType Varchar2(10) Varchar2(20) Varchar2(50) Number(10.Table Name : Item Purpose : Table to store the Information about the Item.

Field DataType Remark Primary key Not Null Canteen_Id Canteen_Name Canteen_Desc Canteen_Address Canteen_Ph_No Canteen_Head Varchar2(10) Varchar2(20) Varchar2(50) Varchar2(50) Varchar2(50) Varchar2(20) Not Null Not Null Table Name : Designation Purpose : Table to store the Information of the Designation. Field Desig_Id Desc BSalary DataType Varchar2(10) Varchar2(50) Number(10.Table Name : Canteen Purpose : Table to store the Description of the Canteen. Field Dept_Id DataType Varchar2(10) Remark Primary key .2) Remark Primary key Table Name: Department Purpose : Table to store the Details of Department.

Field Org_Id Org_Name Desc DataType Varchar2(10) Varchar2(20) Varchar2(50) Remark Primary key Table Name : Wing Purpose : Table to store Details of Wing. Field DataType Remark Primary key Wing_Id Wing_Name Remark Varchar2(10) Varchar2(20) Varchar2(50) .Desc Dept_Name Org_Id Varchar2(50) Varchar2(20) Varchar2(10) Foreign Key Table Name : Organization Purpose : Table to store the Information of Organization.

Table Name :

Section

Purpose : Table to store the details of Section. Field DataType Remark Primary key

Sec_Id Sec_Name Desc Dept_Id

Varchar2(10) Varchar2(20) Varchar2(50) Varchar2(10)

Foreign Key

Table Name :

Employee

Purpose : Table to store the Information of the Employee. Field DataType Remark Primary key Not Null Not Null

Emp_Id Emp_Name Doj Dol Sex Address Desig_Id

Varchar2(10) Varchar2(20) Date Date Varchar2(2) Varchar2(50) Varchar2(10)

Not Null Not Null Foreign Key

Phone_No DA HRA Other_Allowances Section_Id

Varchar2(50) Number(6,2) Number (6,2) Number(6,2) Varchar2(10) Foreign Key

Table Name :

Attendence

Purpose : Table to store the Information of the Attendence Field DataType Remark Foreign Key Primary Key(Emp_Id, Date) Not Null

Emp_Id Date Status Reason Leave_Type

Varchar2(10) Date Varchar2(10) Varchar2(50) Varchar2(10)

Table Name :

Group

Purpose : Table to store the Information of the Group Field DataType Remark Primary key

Group_Id Group_Desc Remarks

Varchar2(10) Varchar2(50) Varchar2(50)

Table Name :

MSalary

Purpose : Table to store the Information of the Msalary Field DataType Remark

Sal_Slip_No Sal_Date Sal_Days Sal_Amount Emp_Id Net_Salary No_Holidays Deduction Payment_Mode Payment_Date Mode_Date Mode_No Bank_Name

Varchar2(10) Date Number(2) Number(10,2) Varchar2(10) Number(10,2) Number(2) Number(6,2) Varchar2(10) Date Date Varchar2(10) Varchar2(20)

Primary key Not Null

Not Null Foreign Key

Not Null Not Null

2) Number(4) Table Name : SaleItem Purpose : Table to store the Information saleitem. Field DataType Remark .Table Name : Stock Purpose : Table to store the Information of the Stock Field DataType Remark Primary key Not Null Not Null Item_Id Quantity_Available ReOrderLevel Varchar2(10) Number(4) Number(4) Table Name : Sale Purpose : Table to store the Information of the Sale Field DataType Remark Primary key Foreign Key Bill_No Cust_Id Date Total_Price Total_Quantity Varchar2(10) Varchar2(10) Date Number(6.

Bill_No Item_Id Quantity Varchar2(10) Varchar2(10) Number(4) Foreign key Foreign Key .

validating entries and searching the database as fast as it can. The coding of the project is written in such a way that it can be altered easily in future. An efficient coding is the one. Therefore reducing the corresponding load on CPU as well as on memory/other system resources. Proper Balancing of CPU & I/O Bound Instruction is being done by the help of code efficiency. CPU & I/O bound instruction are streamline. The speed of execution is enhanced by the help of code efficiency. The coding of the project is quite efficient in handling the errors.Efficiency of the coding is concerned with the proper use of resources by the software. the resources that are most often considered for efficiency are processor time and efficiency. to increase the system throughput and reaction time and waiting period is reduced accordingly. In computer system. if there is a need from the programmer’s side or from the customer’s side. . The need of efficiency arises due to the cost considerations. they must be used efficiently. By efficiency the CPU overhead is reduced. which consumes less processing time and less memory. If some resources are scarce and expensive.

protection form unauthorized access and normalization of database tables has been ensured to achieve the recurred efficiency. 4.Optimization though does not provide any additional checks to the software however it provides that the software be made functional to its desired efficiency consistency with recurred standard. Other security and protection like auto backup. In these software project optimizations been achieved for the following laid down aspects:- 1. CPU Overheads :-By optimization the CPU overheads is reduced to increase the system throughput and reaction time. 3. Crash Recovery:.It has been ensured that the crash recovery is automatic to avoid undue delay is giving direct instructions at the time of crash. Speed of Program Execution :-It has been ensured that the procedure adopted/design/coding done is optimized and superfluous details omitted to meet the requirements. . the speed of execution is enhanced which has future initiated similar reaction in other sub modules 2. CPU & I/O bound instructions are streamlining we can reduce the corresponding load on CPU as well as on memory / other system resources. Proper Balancing of CPU & I/O Bound Instructions :-By optimizing. waiting period is reduced accordingly. By ensuring this.

Customer ID: Validation proved that the details of Customer ID be entered on the correct field and format. . otherwise it would be problematic to further calculation. Different classes of tests are conducted to validate function. It does this by obtaining the length of the field’s value with VB Script’s built.e. In the above software project the requirement of validity checks arises to ensure that the various input data endorse by the user is entered in correct form and design.This is the most important section of the software requirement specification. This section demands a thorough understanding of software requirements. We have given proper time and attention by validating data and database as far as possible. the user is altered that the field is empty. Few of them are given as under :- 1.in Len () function. any discrepancy to the proposed format will show the error and the user can correct the data accordingly. performance and constraints. 1. If a length of 0 is returned. 3. These validation checks in this system have been included to ensure its correctness and desired accuracy. Amount: Amount has to be entered in the correct format i. only numeric value and any variation to the above will show an error to the user.e. IsLength() :This function ensures that the data entered in that field is not empty. DD-MM-YY and any variation to the above will show an error to the user. Validation as the name suggests validate the requirement and act as a rider to ensure that the design software is utilized to its thresh-hold without any error. 2. Date: Likewise date has to be entered in the correct field/format i.

val.". Length = false.". using C#. IsNumber() This function checks to see whether that field’s value is numeric.select. } .NET Script’s IsNumber() function.value) { isNumber = true.value)>0 { isLength = true.select. val. } else { msgbox "This value must be numeric. } Else { msgbox "This value can't be empty. isNumber = false.public Length(val) if len(val. function isNumber(val) if isNumeric(val. } } 2.

} The proposed software can be used to its organization and desired accuracy can be insured as proposed. These validation checks have been provided in all the modules so that the software may be run for it’s laid down standard. .

Parallel implementation 1. This phase is less creative than system design. Serial Implementation :- . Using following two techniques carries implementation: - 1. Methods/implementation technique is adopted depending upon the organization requirement. Before installing at client side its better to implement the software as a parallel run in order to test the software function. Depending on the size of the organization and the risk involved .Implementation :Implementation phase is primarily concerned with user training . site preparation and file conversions. Later if the system shows a efficient functionality then the software can be used in complete and then the old system can be discarded if present. This time period can be between 15 days to 2 months. Implementation of the present project can be simply done by installing the Executable / batch file on any local machine having any Operating System and SQL2000 as the backend. Implementation is the process of having systems personnel check out and put new equipment into use . install new application and construct any files of data needed. Once the proposed system has been tested to its requirement the another important aspect is its correct implementation so that the desired goals of the organization be achieved. the developers may choose to run both old and the new system in the parallel way to compare the results. Serial implementation 2. train users.

Organizational impact :Identification and measurement of benefits to the organization in areas such as financial concerns . response time. including ease of use. Parallel implementation :This is achieved by dividing the entire processing/system into various sub systems. Development Performance:- . User Manager Assessment :Evaluation of the attiudes of senior and user manager within the organization . 2. and competitive impact. operational efficiency . as well as end-users. The system avoids the storage of existing data as it is being done in phases however taken more time and risk involves is much less. The existing system is therefore replaced to the new system step by step and the organization remains functional during change over. Evaluation of the system is performed to identify its strengths and weaknesses.This technique of implementing is adopted when the entire system is to be replaced in one go and the existing system is changed with the proposed system. overall reliability and level of utillization. The actual evaluation can occur along any of the following dimensions :- 1. 2. 3. The system has its own advantages and disadvantages and is adopted keeping in view of the organization requirement this technique is fast however some factor is high for the organization the entire existing system has to be changed simultaneously therefore large amount of existing data has to be stored before change over. 4. Operation Evaluation :Assessment of the manner in which the system function .

the original environment for which the web application was developed is likely to change. Change is in editable when computer based systems are built. This maintenance results in modification to the software to accommodate changes to its external environment.As software is used. Enhancement :. The importance of maintenance is to bring the standards. Often small system deficiencies are found as a system is brought and changes are made to resource availability to carry out these maintenance functions. 1.Evaluation of the development process in accordance with development time and effort .Overtime. The maintenance of existing software can account for over 60 percent of all effort expended by a development organization. Perfective maintenance extends the software beyond its original functional requirements. Adaptive maintenance :. 3. the customer/user will recognize additional functions that will provide benefit. 2. conformance to the budgets and standards criteria. controlling and making modifications. . Corrective maintenance :.This pertains to the changes the software to correct defects. we must develop mechanisms for evaluating. Maintenance is necessary to the eliminate errors in the working system during its working life and to tune the system to any variations in its working environment. therefore.

a newly designed system should have all the pieces in working order. 1. A good test case is one that has a high probability of finding an as-yetundiscovered error. 2. but in reality. each piece works independently. TESTING OBJECTIVES :Testing is a process of executing a program with the intent of finding an error. Testing presents an interesting challenge for the software engineer. The increasing visibility of software as a system element and costs associated with a software failure are motivating forces for well planned. Our . It is a tedious but a necessary step in a system development. Theoretically. A successful test is one that uncovers an as-yet-undiscovered error. through testing. design and coding. the engineer attempts to build software from an abstract concept to an acceptable implementation. During the earlier definition and development phases. The above objectives imply a dramatic change in viewpoint. 1. The purpose of system testing is to consider all the likely variations to which it will be subjected and then push the system to its limits.Introduction :Software testing is an important element of s/w quality assurance and represents the ultimate review of specification. Testing requires that the developer discard preconceived notions of the correctness of the s/w developed and overcome a conflict of interest that occurs when errors are uncovered. In testing the engineer creates a series of test cases that are intended to demolish the s/w that has been built. They move counter to the commonly held view that a successful test is one in which no errors are found.

TESTING TECHNIQUES The techniques followed throughout the testing of the system are as under Black-Box Testing :Black box testing focuses on the functional requirements of the software. Rather. Black Box testing enables the software engineer to derive sets of input conditions that will fully exercise all functional requirements for a program. Black-Box Testing attempts to find errors in the following categories: (1) Incorrect or Missing functions. Black Box Testing is not an alternative to white-box techniques. Unlike White Box Testing. it is a complementary approach that is likely to uncover a different class of errors than white-box methods. it will uncover errors in the software. it can only show that software errors are present. Testing cannot show the absence of defects. 2.objective is to design tests that systematically uncover different classes of errors and do so with a minimum amount of time and effort. (3) Errors in data structures or External data base access. How is functional validity tested? . That is. (2) Interface errors. which is performed early in the testing process. Black Box Testing tends to be applied during later stages of testing. Tests are designed to answer the following questions: 1. (5) Initialization and Termination errors. (4) Performance errors. attention is focused on the information domain. If testing is conducted successfully (according to the objectives stated above). Because Black Box Testing purposely disregards control structure.

Program Testing :- A program represents the logical elements of a system. What data rates and data volume can the system tolerate? 6. What effect will specific combinations of data have on system operation? 7.2. How are the boundaries of a data class isolated? 5. we derive a set of test cases that satisfy the following criteria: (1) Test cases that reduce. White-Box Testing :White Box Testing knowing the internal workings of a product tests can be conducted to ensure that internal operations are performed according to specifications and all internal components have been adequately exercised. Is the system particularly sensitive to certain input values? 4. (4) Exercise internal data structures to ensure their validity. (2) Exercise all logical decisions on their true and false sides. the number of additional test cases that must be designed to achieve reasonable testing. 2. by a count that is greater than one. (3) Execute all loops at their boundaries and within their operational bounds. it must compile and test data correctly . rather than errors associated only with the specific test at hand. (2) Test cases that tell us something about the presence or absence of classes of errors. For a program to run satisfactorily. By applying black box techniques. What classes of input will make good test cases? 3. Using white box testing methods the test cases that can derived are: (1) All independent paths with in a module have been exercised at least once.

. 4. No error is left for correction.NET environment and codes are carefully written and each logical path is traced during the testing for avoiding the logical errors.e. Program testing checks for two types of error: syntax and logical. output of range items and invalid combinations. The test was conducted and all results are evaluated. i.and tie in properly with other program. Each method is tested to see whether it confirms to relate methods in a system. Testing Information flow :In this test process two class inputs were taken they are: 1. These errors are shown through error messages generated by the computer. 3. A syntax error is a program statement that violets one or more rules of the language in which it is written. A logical error deals with incorrect data fields. Test Configuration that includes a test plan and procedure. Method Testing :Methods are invariably related to each other and interact in a complete program. 2. the test results were compared with the expected results and concluded that software quality and reliability are acceptable. The programs are checked for syntax under C#. Each portion of the system is tested against the entire module with both test and lives data before the entire system is ready to be tested. All methods of a program are connected to one another and test is carried out to see whether the path of the methods and objects are in order. testing tools and test cases and their expected results. Software configuration that includes s/w requirement specification designs specification and source code.

Relations Operator Error and Arithmetic Error. 6. Boolean Variable Error. m passes through the loop e. the number of possible tests grow in and geometrically as the level of nesting increases. Data Flow Testing :The data flow testing method selects test paths of program according to the locations of definitions and uses of variables in the program. 8. System Testing :- .n+1 passes through loop Nested Loops The test approach for simple loops is extended to nested loops. Two passes through the loop d. Condition Testing :In this testing the logical condition in the program module is tested. Simple Loops :The following sets of tests were conducted to simple loops where ‘n’ is the maximum number allowable passes through the loop. Only one pass through the loop c. and arithmetic expression are tested. then at least one component of the condition is incorrect. pair of Boolean parentheses. the Boolean variable. Loop Testing :a. If a condition is incorrect. Thus the types of errors in condition testing are Boolean Operator Error. 7. The Boolean operator.n. a relational operator. b. Boolean Parenthesis Error.5. n-1. Skipped the loop entirely. a.

. If recovery is automatic re-initialization. the mean time to repair evicted to determine whether it is within acceptable limits 10. 9. This testing occurs throughout all steps in the testing process. Recovery Testing :This is a system testing that force the s/w to fail in a variety of ways and verifies that recovery is properly performed. Although each test has a different purpose. and restart are each evaluated for correctness. data recovery. If recovery requires human intervention. checking pointing mechanisms. 12. the tester plays the role of the individual who desires to penetrate the system. Security Testing :During this testing. The tester may attempt to acquire passwords through external clerical means and may attack the system with custom s/w design to breakdown any defenses that have been constructed. The tester may also overview the system there by denying service to others and may purposely cause system errors to penetrate during recovery and may browse through insecure data. Performance Testing :This testing is designed to test the run time performance of s/w within the context of an integrated system.System testing is series of different tests whose primary purpose is to fully exercise the computer-based system. all the work should verify that all system elements have been properly integrated and perform allocated functions. hoping to find the key to system entry.

Because SQL-2000 provides such security features which can not be provided by any other RDBMS.CLIENT NEEDS ACCEPTANCE TESTING REQUIREMENTS SYSTEM TESTING DESIGN INTEGRATION TESTING CODE UNIT TESTING To make the better control over system security. . the back end SQL-2000 is selected.

Here we have categorized the rights among employees as per their designation. Only valid user can enter in the project. In this project we have distributed the access rights. There are also some restrictions for the employees who work in the agency. hence it is quite safe from unauthorized access. internal personnel may attempt unauthorized access. . In some cases.Outsiders (hackers) may attempt access for sport. profit or with more malevolent intent. A variety of security measures are provided by the application In this project there is login and password security. Higher the designation higher the access rights.

000/- C) Project Cost : This would include the following Development Cost of the Project Cost of Management Time Training Cost Data Preparation Cost Conversion Cost Others : : : : : 30000/3.000/2.000/3.000/5.000/30.500/NIL 72.000/5.00/- D) Ongoing Cost Maintenance Cost (Hardware) Maintenance Cost (Software) Maintenance Cost (Manpower) : : 2.000/: 2.000/NIL 4.000/- .000/: 2.000/- B) Start Up Cost : This would include the Following Cost of system software Communication software Cost of Recruiting Additional Manpower : : : 2.A) Procurement Cost: This would include the following Cost of Equipment Installation Cost Cost of Application Preparation Cost of Hiring Consultants : : : : 5.

000/- .70.Depreciation Addition Training : 1000/: 1000/- Total Cost 1.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ACTIVITY 0-1 1-2 2-3 3-4 3-5 4-5 5-6 6-7 6-8 6-9 7-8 9-10 8-10 10-11 11-12 TYPE OF ACTIVITY Study existing system Study proposed system Analysis Feasibility study Software Requirement Analysis Dummy Design Testing Coding Training Dummy Dummy Implementation Optimization Review DURATION IN WEEK 1 3 2 1 & 1.5 0 2.5 5 2 3 0 0 2 1 1 Total Duration 20 Weeks . 5-6. 11-12 R/NO. 7-8. 3-5.CRITICAL PATH 0-1. 2-3. 10-11. 1-2. 8-10. 3-4. 6-8. 6-7.

5 6 4-5 7 5-6 8 6-7 9 6-8 10 6-9 11 0 1 2 37-84 5 6 12 9-10 13 8-10 14 10-11 15 11-12 Total Duration 20 Weeks Analysis Dummy 0 Design 2. . This is only reason that every successful businessman pays more and more attention towards the attractive canteen of his product before launching it for the use of general public.5 Testing 5 Coding 2 Training 3 Dummy 0 17 18 19 20 7 8 9 10 11 12 13 14 15 16 Dummy 0 Implementation 2 Optimization 1 Review 1 Now a days what ever new & old product we prepared it’s success depends upon better canteen. 1 2 3 4 5 ACTIVITY 0-1 1-2 2-3 3-4 3-5 TYPE OF ACTIVITY Study existing system Study proposed system Analysis Feasibility study Software Requirement DURATION IN WEEK 1 3 2 1 & 1.R/NO.

Bill. It is useful to maintain daily activities of the Canteen Management System like insertion of new Customer record and modifications in existing record. Payment & Outstand Calculations & Receipt Entry Database and report generation. gets its own way to success. The user will find this application easy to use. This application can be used in any organization using the same interfaces for the various members of the organization. Hence not at the present but in future too it will be more essential. It’s aimed at being a reliable. the system is very useful to the organization and customer as it enables them to interact with each other and provides them with latest information about their business facilities. With the necessity to adapt an efficient and elegant approach towards work professionally and the need to speed up the working process becoming a requirement. Canteen Management System is new information system. because we all are living in a competition age. Now a days many products are being prepared but their success depend upon the information they provide. For this they opt different method of an attractive and pleasant canteen. Besides all these things. Royalty Database. which manage the Customer’s Database. a software which gives relevant information . . The Application will be more users friendly and will allow faster processing of Images & Data. efficient & user friendly. So.Hence not at the present but in future too it will be more essential. CMS ( Canteen Management System ) gives the complete and relevant information to the canteen. calculation of Bills and report generation etc. ERP (Enterprises Resource Planning) software. The application can be used in different Canteen Management System. This application is easily extensible and upgradable according to the organizations need with little or no changes. The product.

which enhances their work speed. The proposed system will be less time consuming. it obviously has advantages over the currently prevalent system with no or less computerization. This software can be used by any Canteen Management System all over the INDIA after making some tiny adjustments. Since many Canteen System are realizing this fact. therefore.switching towards information technology has become the best option. No standard software product is offering and gives the opportunity for the present package a mark for itself. which is what needed the Canteen Management now a days. . Since the whole system will be computerized. The proposed system is a much better system developed with latest technologies. The software will be made in a very simple and user-friendly environment so that a novice user can also operate it efficiently and accurately. So any product directed towards this segment would find a place for itself. the need to automate their systems has drawn them towards purchasing a software product.

The system can also become more efficient by using software to manage bar code reader information . .In future the proposed system will also calculate cash inflows and outflows and will maintain profit and loss account.

1 2 3 TITLE Software Engineering The complete reference C#.SR/NO.NET O’RELLY AUTHOR Pressman Ivan Barose Tata McGraw-Hill .

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

static db() { con = new System. //dr = com.CommandText = "select * from users".SqlConnection con. public static int sid.Data. System.rpdues. public static string gunid.Data.ExecuteReader().SqlClient.SqlClient.. com = new System.str2.SqlClient. com = new System.licenceno.SqlCommand().ConnectionString = "data source=.customername.Connection = con. con.Data. public static int sid. public static System. //com.Close().SqlClient. user.ExecuteReader().Data.SqlCommand com. } } } using using using using System. //dr.Data. System. System. System. System.SqlConnection con. public static string admin.SqlClient. //com.str1.Data.Generic.integrated security=true". System.bhdues.prona.Data.SqlCommand com.Text.Connection = con.slimit.SqlClient.integrated security=true".Open(). con.ConnectionString = "data source=.initial catalog=bharat.. con.str2. public static System.comna.Collections.stgunid. com.Collections.Generic. public static string gunid.Open().Data.SqlDataReader dr. public static string admin.SqlClient.SqlConnection().SqlClient.rpdues.licenceno.slimit.Text.prona. //dr. //dr = com.CommandText = "select * from users".initial catalog=bharat. public static System. com. user. } } } .Close(). namespace Bharat_Gun_House { class db { public static System.stgunid.SqlConnection(). public static System.SqlCommand().SqlClient.SqlClient.Data.bhdues. namespace Bharat_Gun_House { class db { public static System.SqlClient.comna.Data.SqlDataReader dr. con.SqlClient.Data.Connection using using using using System.Data. static db() { con = new System.str1.customername.

com.str1.SqlConnection().ExecuteReader().SqlConnection con.Close(). or remove it.ExecuteReader(). namespace Bharat_Gun_House { public partial class btnshow : Form { public btnshow() { InitializeComponent().StockGG). while (db.dr. System. con.ComponentModel.dr.comna. db.Text.slimit.Connection = con. public static string gunid.dr["cc"]. //dr = com. com = new System.bharatDataSet.SqlCommand com.str2.SqlClient.dr.SqlDataReader dr. System.CommandText = "select distinct bore as cc from priya3".Read()) .Items.licenceno.com. private void FrmSearhStock_Load(object sender. //com. System.dr["cc"]. System.integrated security=true".Close(). namespace Bharat_Gun_House { class db { public static System.Data.bharatDataSetTableAdapters.Data. public static string admin.SqlClient.stockGGTableAdapter.Generic.ExecuteReader(). bool firsttime = true.SqlClient. public static System. You can move.Drawing.SqlClient.cmbclassification. con.CommandText = "select distinct classification as cc from priya3". //dr.dr.Forms.prona.Data.StockGGTableAdapter(). System. System.using using using using System.Text. while (db. } } } using using using using using using using System.customername.Windows.dr = db.dr = db. public static System.Data.stgunid.. EventArgs e) { // TODO: This line of code loads data into the 'bharatDataSet.Read()) { this.dr = db.Read()) { this.sql1="". db. static db() { con = new System.CommandText = "select distinct gunname as cc from priya3".SqlClient.cmbproductname.bhdues.Data. System. user. db.Data.ExecuteReader().Open().ToString()).Close(). db. db.Collections. } db. db.initial catalog=bharat.Items.StockGG' table.Add(db.Add(db. System.com.dr.SqlCommand().com.ToString()).Close().Fill(this.rpdues. System.CommandText = "select * from users".com. this.com.ConnectionString = "data source=.Collections. while (db.dr. String mainsql1 = "select * from priya3 where subitemsid>0 ". } db.Generic. public static int sid.Data. as needed. } bharatDataSetTableAdapters.SqlClient.com. db.StockGGTableAdapter da = new Bharat_Gun_House.

db.dr. while (db.StockGG. db.ToString().dr["armsno"].IndexOf(remove). db. row.ExecuteReader().classification = db. db.ToString()).Items.StockGG.cmbbore. db. db.Read()) { this. } db.ExecuteReader(). row.purchaseprice = Convert.dr["classification"]. this. while (db.dr["purchaseprice"]). ShowData().ToString()).Add(db.dr["saddress"].Add(db.ExecuteReader().dr["qty"]).com.CommandText = mainsql1 +classification +productname +bore+company +location+datepic+Type+LoderType.Subitemsid = Convert.dr.dr["cc"].cmbtype.ToDateTime(db. db.Items. { . while (db. } db.this.com.cmbtype.dr = db.cmblocation. } db.SelectedIndex = 0.dr.ToString()).Rows.CommandText = "select distinct company as cc from priya3".Add(db.com.dr. while (db.dr["cc"]. row.ExecuteReader().dr.CommandText = "select distinct Lodertype as cc from priya3". this.dr["supplierid"]).dr["company"]. this. String s2 = query. } return query. String remove) { int pos = query.cmbvariety.com.ToString().ToDecimal(db. row.Close().ExecuteReader(). db.StockGGRow row = bharatDataSet.Read()) { this.ToInt32(db.SelectedIndex = 0.com.ToString().ToInt32(db.Add(db.com.SelectedIndex = 0.Length.com. row. } void ShowData() { db. row.Close(). row.dr["sname"].ToString()).dr["cc"].cmbproductname.dr["bore"]).saddress = db.dr = db.cmbclassification. db.com.com.dr = db. int len = remove. } db. this.ToInt32(db.Items.cmbcompany.dr. } String GetQueryString(String query. row.NewStockGGRow().Substring(pos + len).SelectedIndex = 0.com.dr["cc"].dr=db. this.ToString()). return s1 + s2.ToString().CommandText = "delete from StockGG".ToString().dr = db.ExecuteNonQuery().com.dr.cmbbore. row.Read()) { this. this.Clear().dr["purchasedate"]).supplierid = Convert.CommandText = "select distinct Type as cc from priya3".ToInt32(db.SelectedIndex = 0. row.Items.purchasedate = Convert.cmbvariety.Close(). } db.CommandText = "select distinct location as cc from priya3". pos). row.company = db. if (pos >= 0 && len > 0) { String s1 = query.Add(db. while (db.cmblocation. db.dr.Close().com.dr["Subitemsid"]).qty = Convert. bharatDataSet.dr["cc"].Items.Close().SelectedIndex = 0.sname = db.dr.dr. this.Read()) { bharatDataSet.cmbcompany.bore = Convert.Substring(0. db.SelectedIndex = 0.armsno = db.Read()) { this.

Rows. bore = " and bore Like '%'". } else { mainsql1 = GetQueryString(mainsql1. private void btnclose_Click(object sender. row. } private void cmbbore_SelectedIndexChanged(object sender.StockGG).cmbproductname.cmbbore. EventArgs e) { if (this. EventArgs e) { this.SelectedItem == "All") { mainsql1 = GetQueryString(mainsql1.dr["marketprice"]). row. String productname = " and gunname Like '%'". this. } ShowData().Focus(). row.Add(row).ToString().SelectedItem. row.dr["Partyname"].cmbproductname.ToString() + "'". classification). row. da. bore).gunname = db. EventArgs e) { if (this. this.ToString(). bharatDataSet.cmbclassification. row. String company = " and company Like '%'". String Type = " and Type Like '%k'". } private void cmbproductname_SelectedIndexChanged(object sender.Type=db.dr["Type"].marketprice = Convert. String LoderType = "and Lodertype Like '%'". } String classification = " and classification Like '%'".SelectedItem. } ShowData().Focus().cmbbore. productname).SelectedItem == "All") { mainsql1 = GetQueryString(mainsql1. productname = " and gunname='" + this.ToString().Lodertype = db. classification = " and classification='" + this.ToString(). private void cmbclassification_SelectedIndexChanged(object sender.ToInt32(db.SelectedItem == "All") { mainsql1 = GetQueryString(mainsql1.Close().cmbproductname.Focus().ToString().Update(bharatDataSet.Close(). bore = " and bore='" + this. } ShowData(). String datepic = " and purchasedate Like '%'". productname = " and gunname Like '%'".location = db.dr["gunname"]. productname). classification).dr.ToString() + "'".ToString(). row.} } db. classification = " and classification Like '%'". String bore = " and bore Like '%'".ToString() + "'".dr["location"]. bore).cmbcompany. this. String location = " and location Like '%'".SelectedItem.Partyaddress = db. EventArgs e) { if (this.StockGG.dr["Lodertype"].dr["Partyaddress"].cmbbore.cmbclassification.Partyname=db. } else { mainsql1 = GetQueryString(mainsql1. } else { mainsql1 = GetQueryString(mainsql1. } .

dr["armsno"].dr["marketprice"]). row. row. row. row.Partyname = db. row.cmbcompany.ToInt32(db. db. db. EventArgs e) { if (this. company = " and company='" + this. row.dr["saddress"]. this.cmblocation.dr["Subitemsid"]).dr["company"].SelectedItem == "All") { mainsql1 = GetQueryString(mainsql1. this. db.Rows.cmblocation.cmbcompany.ToString().ToString().gunname = db. row.ToString(). "'".ToString(). row.Read()) { bharatDataSet. bharatDataSet.Subitemsid = Convert.Rows.purchasedate = Convert. row.qty = Convert.StockGG.ToShortDateString()+ "'". row.NewStockGGRow().ToString().dr["Partyname"].supplierid = Convert.ToString() + "'". location = " and location='" + this.ToInt32(db.location = db. void DisplayData() { db.ToInt32(db. company = " and company Like '%'".Type = db.ToString() + } ShowData().CommandText = "delete from StockGG".marketprice = Convert.chkgun.dr. company).ToString().dr["supplierid"]). location).Value.cmblocation.Focus().dr["qty"]).dr["purchasedate"]).classification = db. String br = " and bore Like '%'".dr["sname"].Update(bharatDataSet.SelectedItem == "All") { mainsql1 = GetQueryString(mainsql1. location = " and location Like '%'". String ty = " and Type Like '%'".Partyaddress = db. location).armsno = db.bore = Convert. row.sname = db.StockGG. } . row.datetimepic. } ShowData(). row. while (db. bharatDataSet.dr["Type"].StockGGRow row = bharatDataSet.Date. datepic = " and purchasedate='" + this.dr["bore"]).Add(row). String pro = " and gunname Like '%'". } String cl = " and classification Like '%'".ToInt32(db.com.com. } else { mainsql1 = GetQueryString(mainsql1. row.dr["classification"].StockGG.Focus(). } else { mainsql1 = GetQueryString(mainsql1.purchaseprice = Convert.dr["gunname"].datetimepic.saddress = db.private void cmbcompany_SelectedIndexChanged(object sender.com.SelectedItem.CommandText = mainsql1 +cl+pro+br+ty. datepic). ShowData(). row.ToString(). row.ToDateTime(db.dr["location"].ToDecimal(db. } private void datetimepic_ValueChanged(object sender.ToString().ToString().SelectedItem.dr = db.Focus().dr["Partyaddress"].company = db. EventArgs e) { if (this. company).ExecuteReader().StockGG).ToInt32(db. da.ToString().dr["purchaseprice"]).com. row.ExecuteNonQuery(). } private void cmblocation_SelectedIndexChanged(object sender. EventArgs e) { mainsql1 = GetQueryString(mainsql1. this.Clear().

CheckState =CheckState.chkgun.Text + "'". KeyPressEventArgs e) .Text+"'".CheckState = CheckState.Unchecked. pro = " and gunname='"+this. DisplayData().CheckState = CheckState.chkgun.chkRifle. cl = " and classification='" + this.radAmmunation.Unchecked.radArms.Text+"'".chkPistole. this. GetQueryString(mainsql1.CheckState = CheckState. pro = " and gunname='" + this. DisplayData().CheckState = CheckState. DisplayData().CheckState = CheckState. br = " and bore Like '%'".CheckState = CheckState. cl = " and classification='" + this.Unchecked. this. this.Unchecked. GetQueryString(mainsql1.Text + "'". EventArgs e) { this. this.chkgun. EventArgs e) { this. private void btncancel_Click(object sender. this.chkPistole. } private void chkgun_KeyPress(object sender. cl).Unchecked. pro).CheckState = CheckState.Close(). } private void chkRifle_CheckedChanged(object sender. DisplayData(). EventArgs e) { GetQueryString(mainsql1.CheckState = CheckState.Unchecked.CheckState = CheckState.chkRevolver. pro = " and gunname='" + this. } private void chkgun_CheckedChanged(object sender. } private void radAcessories_CheckedChanged(object sender. this.Unchecked.chkRevolver.radAcessories.br).Unchecked. } private void chkRevolver_CheckedChanged(object sender. pro). GetQueryString(mainsql1. EventArgs e) { GetQueryString(mainsql1.chkRifle. EventArgs e) { GetQueryString(mainsql1.CheckState = CheckState. pro = " and gunname='" + this.Unchecked. EventArgs e) { this.chkRifle. DisplayData(). this.dr.Unchecked.chkRevolver. EventArgs e) { this. } private void radbore_CheckedChanged(object sender.Text + "'".chkgun.chkRevolver.Unchecked.Text + "'". EventArgs e) { GetQueryString(mainsql1.} db.cl).Text + "'". GetQueryString(mainsql1. DisplayData(). DisplayData(). DisplayData().CheckState = CheckState.chkRifle. EventArgs e) { this. } private void radArms_CheckedChanged(object sender.chkPistole.cl). pro). cl = " and classification='"+this.Unchecked.chkPistole. } private void radAmmunation_CheckedChanged(object sender. pro). this.Close(). } private void chkPistole_CheckedChanged(object sender.

Drawing.cmbtype. } private void cmbvariety_SelectedIndexChanged(object sender. System.qty. } private void radtype_CheckedChanged(object sender.SelectedItem. System.SelectedItem. } private void cmbtype_SelectedIndexChanged(object sender.com.ToString() + "'". Type). LoderType = " and Lodertype Like '%'". private void btnsave_Click(object sender. } else { mainsql1 = GetQueryString(mainsql1.Collections. System.cmbvariety. } catch { cnt = 0.ComponentModel.useqty=0. EventArgs e) { GetQueryString(mainsql1.cmbvariety. } ShowData(). LoderType = " and Lodertype='" + this. cnt = Convert.KeyChar==32) { this.cnt. System.Forms.returnqty=0.CommandText = "select sum(qty) from productinsert where armsno! =''".chkPistole.Generic.supid=0.Data.remainqty=0. EventArgs e) { if (this.Windows.cmbtype.Type).com. using using using using using using using System. LoderType).ToString() + "'". } . DisplayData(). string dtr="". namespace Bharat_Gun_House { public partial class ConsinmentAccept : Form { public ConsinmentAccept() { InitializeComponent().Text. } } } } ShowData().bcnt. Type = " and Type='" + this. System. ty).{ } if (e. } else { mainsql1 = GetQueryString(mainsql1. } int quantity. ty = " and Type Like '%'". LoderType).SelectedItem == "All") { mainsql1 = GetQueryString(mainsql1. EventArgs e) { try { db.ToInt32(db.Focus().SelectedItem == "All") { mainsql1 = GetQueryString(mainsql1. Type = " and Type Like '%'". System. EventArgs e) { if (this.ExecuteScalar()).

cmbType." + SubitemID + ".Enabled = false." + supid + ".com.Enabled = false.Text = "".Text+"'". this.CommandText = "insert into productinsert values(" + Sno + ".Date. this. this. this.CommandText = "insert into productinsert values(" + Sno + ".txtLocation. this.Text + "' and gunname='" + this.Value + ". .Text + "'and armsno='"+this.ToShortDateString() + "'.Text + "." + this.Text+"'and lodertype='"+this.Enabled = false.cmbbty.Show("Record Inserted").'" + this.cmbpna.Value + ".cmbType." + SubitemID + ".'" + this.txtprs.CommandText = "SELECT sum(qty) FROM PRODUCTINSERT WHERE bore>0 and armsno=''". db.txtpno. if (bcnt <= 1000) { db.Text + "' and bore='" + this.'" + this.datere." + SubitemID + ".cmbvariety. this. db.cmbvariety.Text + "')".'" + this. this. this.ToInt32(this.ToShortDateString() + "'. this.cmbbty.com.Value." + this.Text + "')".cmbType. bcnt = Convert. if (db.txtaddress.Text = "".Enabled = false.cmbvariety.com.Close().'" + dtr + "'.Enabled = false.Enabled = false.com.'" + this.cmbvariety. db." + this.Text = ""." + supid + ".txtLocation.Text = "".datere. } else { db.Text + "' and company='" + this.datere." + PartyID + ".'" + this." + this.Text = "".'" + this.Value + ".Text + "'.Close()." + this.Date." + this.dr." + returnqty + ")".dr.ExecuteReader().Text + "'.Enabled = false.Text = "".Text + "'." + this.Date." + this.CommandText = "insert into ConsignmentReceive values(" + ConsignmentID + "." + PartyID + ". db. this." + this." + PartyID + ".txtpno.com. db.cmbpna.datere.Value + ")".numericqty. this.CommandText = "insert into Consignmentdetail values(" + ConsignmentID + ".Enabled = false.Text + ".Text + "'.com. this.'" + this.ExecuteNonQuery(). db. this.txtcna.ExecuteScalar())." + SubitemID + ".ToInt32(db.numericqty. this.com. this.dr = db.cmbbty.cmbType.Text + "'.txtpno.cmbType.Text = "".Text = "".ToShortDateString() + "'. this.Text + "'.Value. this.Read()) { db.Enabled = false.txtprs. this. db.Date.'" + this.cmbpartyname.com.cmbclassification.'" + this.cmbbty.try { if (cnt <= 1000) { db.com. qty = Convert.ToShortDateString() + "'.txtcna.Enabled = false.Text + "'.Text + "' and type='" + this.numericqty. this. db." + PartyID + ".'" + this.txtprs.ToShortDateString() + "'.Text + ".cmbclassification." + this.'"+this.Text + "'.Value.com. this.Text+"'. MessageBox.txtprs.'" + this.'" + this.Value). this.Text = "". this.'"+this.'" + this.txtcna. db.numericqty.cmbclassification.datere." + ItemID + ".Text + ".datere." + ItemID + ".txtpno. this.cmbpna.Value.Value + ")".com.txtmprice.cmbclassification.CommandText = "insert into ConsignmentReceive values(" + ConsignmentID + ".cmbpna.Enabled = false.Text+"'.txtLocation.txtcna.ExecuteNonQuery().CommandText = "select * from productinsert where Classification='" + this." + SubitemID + ".ExecuteNonQuery().Value.Enabled = false.txtcna.com.'" + this.cmbclassification.Text + "'.'" + this.cmbbty.com.Text = "".numericqty.txtmprice.cmbpna.cmbpartyname.txtpno.Text + ".Text = "".Text + "." + this.Date." + PartyID + ". this.Text = ""." + qty + ".cmbvariety.txtaddress.dr." + useqty + ".numericqty.ExecuteNonQuery().Text + "'.'" + this. db.txtmprice.numericqty.

this.'" + this.cmbbty. this.txtaddress.'" + this.Text+"'.txtcna.Text+"'".cmbvariety. this.Show("BULLETS LIMIT EXEED :-" + bcnt.cmbpartyname.txtcna." + PartyID + ". this.cmbclassification.Text = "".txtaddress.ExecuteNonQuery(). this.'" + this.cmbType.CommandText = "insert into productinsert values(" + Sno + ". this.cmbclassification.'" + this.com.ToString()).Date. this.Enabled = false. this.CommandText = "insert into Consignmentdetail values(" + ConsignmentID + ". this.'"+this.'" + this.txtpno.datere.dr.cmbpna. } } else { MessageBox." + this.Value." + returnqty + ")".Text = "".numericqty.com." + SubitemID + ". this. this.Read()) { db." + this.Text + "'.ToShortDateString() + "'.Text = "". if (db. this." + PartyID + ".Text + "'.Enabled = false.Text = "".ToInt32(this.Text = "".CommandText = "select * from productinsert where Classification='" + this.cmbclassification.txtLocation.Enabled = false. db. this. this.db. db. this. .cmbpna.Enabled = false.Date.Close().com.txtaddress.cmbbty.Value = 1.'" + this.com." + qty + ".cmbType." + PartyID + ".Enabled = false.txtcna.Text = "".txtmprice.txtprs.com. this." + remainqty + ".Text + "' and bore='" + this.cmbpna. this.txtprs.CommandText = "insert into Consignmentdetail values(" + ConsignmentID + ".cmbclassification.Text + ". this.Text = "".'" + this. this.Enabled = false.Text + "' and type='" + this.ToShortDateString() + "'.Text = "".Enabled = false.numericqty." + SubitemID + ". db.com.numericqty.dr. this.Text = "".txtmprice." + useqty + ".Enabled = false.ExecuteNonQuery().cmbpna." + returnqty + ")".Date.com.Text + "'.Enabled = false.txtpno. db. this.Text + "' and company='" + this.'" + dtr + "'.txtpno. this." + SubitemID + ".Text = "".Text = "".Value).Text+"'and lodertype='"+this.'" + this.txtprs.cmbbty." + supid + ". this." + SubitemID + ".cmbpartyname.Text = "". this.Text = "".datere.Text + ".cmbvariety.'" + dtr + "'.txtcna." + ItemID + ".txtmprice. this. MessageBox.numericqty.datere.Show("Record Inserted").Value.Text = ""." + this.Value + ".Enabled = false. this.Text = "".numericqty.txtcna.com.'" + this.txtprs.Text + "'and armsno='"+this.Value + ". this.datere.Value.Text + "')".Text = "". this.cmbType.cmbbty.Text = "".cmbpna.Text + "'. this.Value.Value + ".cmbbty.Value + ")"." + this." + PartyID + ".datere. this." + useqty + ".ExecuteNonQuery().txtpno. db.txtLocation.ToShortDateString() + "'.txtLocation.Date.numericqty.com.ExecuteReader().cmbpartyname.ExecuteNonQuery().cmbpna.Text = "". this.dr = db.cmbbty. this. this. db. qty = Convert.txtpno.'" + this. db.numericqty.com.Show("Record Inserted")." + this.Text + "'. db.Text = "".cmbType.Text = "".com." + this.ExecuteNonQuery(). this.ToShortDateString() + "'.Enabled = false." + this.cmbclassification.Text + ".Text = "". MessageBox. db.Enabled = false.CommandText = "insert into ConsignmentReceive values(" + ConsignmentID + ".Text + "' and gunname='" + this.Text = "". db. this.

cmbclassification." + SubitemID + ".'" + this.CommandText = "insert into productinsert values(" + Sno + ".ExecuteNonQuery().cmbbty. this." + this.txtpno. this.com. this.txtaddress. this.com.Text + "'.Close().Text + "'." + this.txtpno.Text + "'.Text = ""." + supid + ".'" + this.cmbbty.Text + "'.txtcna.Text = "".txtmprice." + PartyID + ". this." + this. this. this. db. this.Text + "'and armsno='"+this.Enabled = false.Enabled = false." + ItemID + ".ToString()).txtLocation." + PartyID + ".cmbclassification. this.dr = db.'" + this.cmbType.Value + ". db." + this. db. this.txtpno.Text + "'.Show("Record Inserted").txtcna. this.Text + "'.Text = "".Text = "".'" + this.cmbpna.txtprs.Enabled = false.cmbpna.Text + "')".dr." + } .Text + ".Enabled = false.txtcna.Text + "' and company='" + this.Enabled = false.txtaddress.Text + "' and type='" + this.datere.datere.'" + dtr + "'.Text+"'and lodertype='"+this.datere. this." + SubitemID + "." + this. qty = Convert. db.cmbpartyname.Text + "'.numericqty.Text = "". } } else { MessageBox.Enabled = false.txtprs.numericqty.cmbbty.CommandText = "insert into ConsignmentReceive values(" + ConsignmentID + ". this.txtLocation.Text = "". db.Enabled = false." + this.Value.Text + ". db. db. this.ToShortDateString() + "'.cmbbty.Text + "'.'" + this." + SubitemID + ".com.'"+this. this.ExecuteNonQuery()." + PartyID + "." + returnqty + ")". this.Value).txtcna.Value.com.datere.'" + this." + PartyID + ".cmbvariety.txtpno.com.this.cmbpartyname.'" + this.ExecuteReader().Text + ".cmbvariety.CommandText = "select * from productinsert where Classification='" + this.txtprs.ToShortDateString() + "'.cmbpna.'" + this.ToShortDateString() + "'.Text = "".cmbpna.Text + ".txtmprice.Text+"'.Text + "'.Date.Enabled = false. this.'" + this.com.cmbpna.Value + ".Date.Enabled = false.Enabled = false.cmbType.txtprs.Text + "' and bore='" + this.cmbclassification. this.'" + this.Close(). this.cmbType.Value = 1.com.Enabled = false.cmbclassification.Enabled = false. db. db.cmbclassification. this. this." + this. this. MessageBox.Text + "' and gunname='" + this.Enabled = false." + useqty + ". this. } else { db.ToInt32(this.'"+this.Text = "".Text = "".Enabled = false. if (db.cmbpartyname.Date. this." + SubitemID + ".txtprs.numericqty.Date.Show("Limit Exeed :-" + cnt.'" + this." + this.com.ExecuteNonQuery().Text = "". this. this.cmbvariety.cmbType.Enabled = false.CommandText = "insert into productinsert values(" + Sno + ".Read()) { db.ToShortDateString() + "'.numericqty.Text + ".txtpno.Enabled = false.dr.dr.txtcna.'" + this." + supid + ".'" + this.Text = "". this.Enabled = false.Text+"'". this.Value.datere.'" + this.numericqty.Value." + remainqty + ".cmbbty.numericqty. this. this.cmbType.com.Enabled = false.CommandText = "insert into Consignmentdetail values(" + ConsignmentID + ".datere.txtcna.Enabled = false.txtpno.numericqty.Text+"'.Value + ")".txtaddress.

com.ExecuteNonQuery(). this.cmbpartyname.'" + this. db.Text + "'.txtpno.txtcna.Show("Record Inserted").txtaddress.Text + ".CommandText = "insert into ConsignmentReceive values(" + ConsignmentID + ".cmbclassification.com.Text = "". MessageBox. MessageBox.'" + this.txtaddress. this.'" + this." + PartyID + ".txtcna." + qty + "." + SubitemID + ".CommandText = "insert into Consignmentdetail values(" + ConsignmentID + ".cmbpna. this.numericqty.txtmprice.numericqty." + this.Enabled = false.Value + ")"." + SubitemID + ".Date.Close().numericqty.cmbType. this.CommandText = "insert into productinsert values(" + Sno + ".txtpno.txtpno.Text = "".cmbType.com. db. db.Enabled = false.cmbvariety.cmbType.Value.txtprs.Value + ".txtprs. db.cmbType.txtpno.cmbclassification. db.datere.Enabled = false.Text = ""." + PartyID + ".Enabled = false." + this.'" + this. } else { db.txtprs." + supid + ".Value + ".cmbpna. this.'" + this.txtLocation.txtcna. db.Enabled = false." + this.CommandText = "insert into Consignmentdetail values(" + ConsignmentID + ".Value + ".cmbpna.Date.cmbbty." + PartyID + ".com.Date.Text = "".'" + this.cmbclassification.Enabled = false." + returnqty + ")".Text = "". this.txtcna. this.'" + this.Text = "".datere.Value. this.Text = "". this. this.cmbbty.numericqty.numericqty.Value + ")". db.ExecuteNonQuery().datere." + useqty + ".dr.Date." + PartyID + ".Value + ".txtLocation.com.Value.'" + this.this. this.Value = 1.numericqty.Text = "". this.numericqty.ExecuteNonQuery().Value." + SubitemID + ".ExecuteNonQuery(). this.CommandText = "insert into ConsignmentReceive values(" + ConsignmentID + ".Value.Text + "')". this. .cmbclassification.Text + "'.txtpno.Enabled = false.Enabled = false.com.ExecuteNonQuery()." + PartyID + ".cmbpna.cmbbty.com." + ItemID + "." + ItemID + ". this.Enabled = false.Text + "'.Text = "".Text + "'. this.Text = "".cmbpartyname.'" + this.'" + dtr + "'.com.txtmprice.ToShortDateString() + "'.cmbclassification. this.Text = "".txtLocation.Enabled = false.Text = "".'"+this.com.Enabled = false. this.Text = "".Text = ""." + SubitemID + ". this. this." + returnqty + ")".Text = "". db.datere.Enabled = false. this.txtLocation. this.numericqty.ToShortDateString() + "'.Text + "')".txtaddress. this.Enabled = false.Enabled = false. this.com. this.Text = ""." + this. this. this.Text + "'.Enabled = false." + useqty + ".cmbbty.Text = "".txtmprice.txtprs. this. this.txtprs.datere.'" + this. db. db.cmbbty.Text = "".cmbpartyname. this." + this.Enabled = false. this." + this. this.ToShortDateString() + "'.Text+"'.ToShortDateString() + "'.'" + this. this." + this." + SubitemID + ".Enabled = false.'" + dtr + "'.Text = "". this. db. this.ExecuteNonQuery(). this.Text + ".com.Text + "." + this.ToShortDateString() + "'.cmbclassification.Text = "".datere. this.Date.cmbpna.'" + this. this.Show("Record Inserted").'" + this.Text = "".datere.txtcna.Text + ".txtmprice.Enabled = false. this." + remainqty + ". this." + this. this.Text = "".Text + "'.

db.ToString()). this.txtLocation.dr["cc"]. this.Close().com.Read()) { if (db. this. private void ConsinmentAccept_Load(object sender. } db.ToString() != "") .datere.com.ExecuteReader().Enabled = false.ExecuteReader().ToString()).Sno.dr. db. } db.numericqty.Items.Enabled = false.ToString()). db.ToString() != "") this. int cons.cmbpartyname.Enabled = false.Add(db.dr["dd"]. this. } } } catch (Exception ee) { MessageBox.Enabled = false.dr.numericqty.dr = db.txtcna. this.dr. db.dr.dr. this.Enabled = false.ToString()).Add(db. db.com. db.this.CommandText = "select distinct ITEMNAME as cc from SUBITEM". db.Enabled = false.dr.com.Enabled = false.cmbbty.Add(db.txtaddress.com.dr["bb"].ToString()).Items.CommandText = "select distinct bore as bb from productinsert".ToString() != "") this. this.dr["bb"]. while (db. this.CommandText = "select distinct partyname as par from party".txtaddress.Enabled = false. } db.txtcna. while(db. } db.Close().com.com.txtaddress.Enabled = false.dr = db.dr = db. db.Add(db.Enabled = false. this. while (db.com.dr.Enabled = false.cmbpartyname.cmbpartyname.txtmprice.dr.dr["par"]. this.Enabled = false.Read()) { if (db.CommandText = "select distinct type as dd from productinsert".dr = db.dr["aa"]. while (db.cmbpna. this.Items.Enabled = false.CommandText = "select distinct company as dd from productinsert". } db.ToString() != "") this.Read()) { if(db.Enabled = false.cmbvariety. this.ExecuteReader(). db.cmbpna.ExecuteReader().dr.Read()) { if (db.txtpno.cmbType.Read()) { if (db.cmbclassification.Items.Close().ExecuteReader().cmbclassification.Enabled = false. this.Add(db.txtprs. EventArgs e) { this. db.Enabled = false.cmbpartyname.dr.dr.com.Enabled = false.dr["aa"]. while (db.Items. } } string consin. this.Show(ee.CommandText = "select distinct ITEMNAME as aa from ITEMS".dr["dd"].ToString()). db.dr["par"].Read()) { if (db.ToString()!="") this. this. this. try { db.ToString() != "") this.ConsignmentID.dr["cc"].com.Enabled = false.ExecuteReader().dr = db.Close().Enabled = false. while (db.Close().dr = db.dr. this. db.Close().com.dr["dd"].com.cmbbty.

} db. db. } private void btnref_Click(object sender. } db. while (db.ExecuteReader().Close(). this. EventArgs e) { this.Hide(). Sno = Convert.com.ToString() != "") this.Close().com.ToInt32(db. this.Enabled = true. Sno++.Enabled = true.dr.Enabled = true. db.Enabled = true. db.cmbType. } db.dr.dr = db. ConsignmentID = Convert.ToString()). this.ExecuteReader().Enabled = true.cmbpartyname. this. db. this.dr.txtLocation.txtpno.dr["dd"]. EventArgs e) { this. } catch { ConsignmentID = 0.CommandText = "select * from Limit ".Show().dr["dd"].Close().dr. LinkLabelLinkClickedEventArgs { .Items.CommandText = "select distinct lodertype as dd from productinsert".Enabled = true. this. LinkLabelLinkClickedEventArgs e) { SetLimit sl = new SetLimit(). db.numericqty.txtaddress. this.ExecuteScalar()).txtcna.com.ToString()).Read()) { if (db.com.Close().Items. this.dr.cmbbty.cmbType.Add(db. ConsignmentID++.txtmprice.com. this.Enabled = true.Enabled = true.dr["dd"]. } } private void btncl_Click(object sender.Enabled = true.this.CommandText = "select max(ConsignmentID)from ConsignmentReceive". this.Enabled = true.ExecuteScalar()).Read()) { db.com. this. this.Enabled = true.slimit = Convert.cmbpna.ToString()).ToInt32(db. } private void linkLimit_LinkClicked(object sender.txtaddress.cmbvariety.ToInt32(db. if (db.cmbvariety. } e) private void Linknewuser_LinkClicked(object sender. this.com. sl.CommandText = "select max(Sno)from productinsert".Enabled = true. EventArgs e) { db. } private void btnadd_Click(object sender. this.Enabled= true.dr = db.datere.Enabled = true. this.Add(db. this.Enabled = true.cmbclassification.txtprs.com.Enabled = true.cmbpartyname.dr[0].

cmbpartyname. ItemID = Convert.Focus().ExecuteScalar()).com.Show(). } } private void txtmprice_KeyDown(object sender. private void cmbpartyname_SelectedIndexChanged(object sender.CommandText = "select * from party where PartyName='"+this.ToInt32(db.FrmSupplier sup = new FrmSupplier().Focus().Focus(). EventArgs e) { this.cmbclassification.Show().dr["PartyID"]).CommandText = "select SubitemsID from Subitem where ItemName='"+this.Text + "'". this. EventArgs e) { try { db. } private void linkLabel1_LinkClicked(object sender.Focus().dr.Enter) { this. KeyEventArgs e) { if (e. SubitemID = Convert. } db.KeyCode == Keys.cmbpna.com.dr["PartyAddress"].Focus().Close(). EventArgs e) { db.datere.Text+"'".ToString(). EventArgs e) { this. } private void cmbType_SelectedIndexChanged(object sender.Focus(). sup. } private void txtprs_KeyDown(object sender. } private void txtcna_SelectedIndexChanged(object sender.dr.ToInt32(db. } private void cmbclassification_SelectedIndexChanged(object sender. private void cmbpna_SelectedIndexChanged(object sender. } private void datere_ValueChanged(object sender.Read()) { this.com. EventArgs e) { this. } int SubitemID. par.ExecuteScalar()).com.com. EventArgs e) { db. this.Focus(). } int PartyID. } catch { } } private void cmbbty_SelectedIndexChanged(object sender. LinkLabelLinkClickedEventArgs e) { FrmParty par = new FrmParty().Focus().Text = db. if (db. db. KeyEventArgs e) { if (e.cmbpartyname.CommandText = "select itemId from Items where ItemName='" + this.txtaddress.Text+"'".cmbType.cmbpna.ItemID.KeyCode == Keys.ExecuteReader(). EventArgs e) { this.Enter) { .ToInt32(db. PartyID = Convert.txtprs.cmbbty.com. this.Close().txtmprice.cmbvariety. this.dr = db.

Generic.Focus().KeyCode == Keys.ComponentModel. System.Data.Focus().Text.} } this. this.Show().KeyCode == Keys.Enter) { this.txtpno. EventArgs e) { this. edt. System. KeyEventArgs e) { if (e.numericqty.KeyCode == Keys.KeyCode == Keys.Drawing. System.Enter) { this. KeyEventArgs e) { if (e.Enter) { this.Focus(). namespace Bharat_Gun_House { public partial class FrmConsignmentedit : Form { public FrmConsignmentedit() .Focus().txtcna.Collections. } private void txtmprice_KeyDown_1(object sender.Enter) this. KeyEventArgs e) { if (e. LinkLabelLinkClickedEventArgs { FrmConsignmentedit edt = new FrmConsignmentedit(). } } private void txtaddress_KeyDown(object sender. KeyEventArgs e) { if (e.Focus().Enter) this.KeyCode == Keys. System.Forms.Focus(). } private void txtprs_KeyDown_1(object sender. System. KeyEventArgs e) { if (e.KeyCode == Keys.Close(). } } private void numericqty_KeyDown(object sender. } private void cmbvariety_SelectedIndexChanged(object sender. System.btnsave.Windows. } } private void txtLocation_KeyDown(object sender. } } } using using using using using using using System. KeyEventArgs e) { if (e.txtLocation.Focus(). private void txtpno_KeyDown(object sender.txtmprice.txtpno.Enter) { } } e) private void linkLabel2_LinkClicked(object sender.

InitializeComponent().txtdate.dr["sno"]). } } int subitemsid.txtmprice.ExecuteNonQuery().partyid. conid = Convert.Text = db.Text = db. r.qty = Convert.ToString().dr["partyaddress"]. r. r.dr.dr["sno"]).Text = db.ToString(). db.dr["partyname"].dr["classification"].dr["consignmentid"]). r.com.conid. r.dr["receivedate"].Text = db.ToString().ToString().ToInt32(db.Cells[0].com.dr["Lodertype"].dr["subitemsid"]).ToString(). r.ToInt32(db.ToInt32(db. DataGridViewCellEventArgs e) { try { sno = Convert.Rows[e. this.com.Close().dr["conreceivedate"]. private void FrmConsignmentedit_Load(object sender.ToString().dr["Lodertype"].ToInt32(db.ToString().armsno = db.dr.dr["subitemsid"]). receivedetailTableAdapter.dr["qty"].Close().dr["partyid"]). private void dataGridView1_CellClick(object sender. sn = Convert.partyid = Convert.receivedetail).ToInt32(db. this.partyaddress = db.dr["armsno"].txtqt.dr["gunname"].txtremain. db. bharatDataSet.txtpname.dr["armsno"].ExecuteReader().dr[14]).dr.Text = db. this.ToString().ToInt32(db.dr["bore"]).ToString().ToString(). if (db.ToInt32(db.ToString(). this.Update(bharatDataSet. this.com.txtuse.ToString()). r.ToString().ToString().txtpno. db.subitemsid = Convert.dr["location"].Add(r). } int sn.ToInt32(db. EventArgs e) { try { db.txtclassi.ToInt32(db.marketprice = Convert.Show(ee.partyname = db.consignmentid = Convert. this.Text = db.dr["company"].Text = db. r. partyid = Convert. this.ToString().Text = db.dr["company"].dr[14].ToInt32(db.ToInt32(db.Sno = Convert.Lodertype = db. r.ToString().txtaddr. r.Text = db.ToInt32(db.dr["marketprice"]).receivedate = db.sno.Read()) { if (Convert.dataGridView2. string str.ToString().RowIndex]. r.dr["consignmentid"]). r.dr["partyid"]).txtcn.remainingqty = Convert.dr = db.dr["location"].txtvariety. this.classification = db. r.ToDecimal(db. db.Text = Convert.NewreceivedetailRow().ExecuteReader().txtloca.Read()) { this.receivedetailRow r = bharatDataSet.Value).ToString().dr = db.dr["useqty"].location = db.dr["partyaddress"].dr["marketprice"]).bore = Convert.com. this.ToString().Rows. r.dr["gunname"]. db.Text = db. this.Text = Convert. this.receivedetail.ToString(). r.company = db.type = db.Text = db. } db.com.ToString().useqty = Convert. r.ToString().ToString()). } catch (Exception ee) { MessageBox.ToInt32(db. this.dr["qty"]).dr["sno"])!= sn) { bharatDataSet.gunname = db.ToInt32(this. this.ToString().txtty.dr["partyname"].ToString(). r. r.Text = db.dr["Type"].CommandText = "delete from receivedetail". subitemsid = Convert. this.ToString().txtprona.dr["classification"].txtbore.CommandText = "Select * from consignment_view". while (db.ToString().dr["useqty"]).ToInt32(db.ToInt32(db.CommandText = "select * from receivedetail where sno="+sno+"".dr["bore"].receivedetail. } } db. r.Text = db.dr["Type"]. { .dr.

cn.CommandText = "select partyid from party where partyname='" + this.ExecuteNonQuery(). db.Text + "'.Show("Record Updated").Text + ". MessageBoxButtons.com. KeyEventArgs e) { if (e.qty=" + this. db.ExecuteNonQuery(). KeyEventArgs e) .Lodertype='"+this.Close(). db.com.CommandText = "update productinsert set classification='" + this.Text + "'.com.com.company='" + this. int itemid = Convert.Focus().Text + "'. MessageBox.CommandText = "Update consignmentreceive set partyid=" + pid + ". this.YesNo.CONRECEIVEDATE='" + this.partyid=" + partyid + ".com.txtclassi.Show(ee.txtdate.ToString()).subitemsid=" + sid + ".com. ConsinmentAccept cn = new ConsinmentAccept().ExecuteNonQuery(). db.ToInt32(db.Text + ". } private void txtprona_KeyDown(object sender.txtaddr.ExecuteNonQuery(). int pid = Convert. } } private void btncan_Click(object sender.Close().marketprice=" + this.ExecuteScalar()).txtdate.com.Text + ".com.txtvariety.CommandText = "delete from consignmentdetail where consignmentid=" + conid + "".com.} catch (Exception ee) { MessageBox.txtcn.txtremain.subitemid=" + sid + ".txtprona.KeyCode == Keys.com. EventArgs e) { this.com. db.armsno='" + this.txtloca.com.Show("Are You Sure".Text+"'.RECEIVEDATE='" + this. edt.txtuse.Text + "'". "Delete". db.Text + "'.Show().com.CommandText = "delete from consignmentreceive where consignmentid=" + conid + "". if (DR == DialogResult. location='" + this. } private void btndit_Click(object sender.ExecuteScalar()).CommandText = "select itemid from items where itemname='" + this.Text + "'. db.Text + "'. MessageBoxIcon.gunname='" + this.txtmprice.ToInt32(db.subitemsid=" + sid + " where sno=" + sno + "". EventArgs e) { try { db. db.txtprona.CommandText = "Update consignmentdetail set partyid=" + pid + ".ExecuteScalar()).txtqt.txtprona.bore='" + this.txtbore.Text + "'.Text + " where consignmentid=" + conid + "".ToInt32(db.Enter) this.txtclassi. int sid = Convert.com.com.useqty=" + this. FrmConsignmentedit edt = new FrmConsignmentedit(). db. db.Text + ".ExecuteNonQuery().txtpname.Text + "'.com.com. } } catch { } } private void txtclassi_KeyDown(object sender.Question). db.txtpno.CommandText = "delete from productinsert where sno=" + sno + "". } catch { } } private void btndel_Click(object sender.type='" + this.qty=" + this. EventArgs e) { try { DialogResult DR = MessageBox.Yes) { db.Text + "'". db.CommandText = "select subitemsid from subitem where itemname='" + this.itemid=" + itemid + " where consignmentid=" + conid + "". db.ExecuteNonQuery().Text + "'".com.Text + "'and partyaddress='" + this.Text + "'.txtty.txtqt.remainingqty=" + this.Show().

Focus(). } private void txtaddr_KeyDown(object sender. KeyEventArgs e) { if (e.KeyCode == Keys.txtmprice.KeyCode == Keys.KeyCode == Keys.Focus().Focus(). } private void txtdate_KeyDown(object sender. } private void txtqt_KeyDown(object sender.Enter) this.Enter) this. } private void txtpname_KeyDown(object sender. private void txtbore_KeyDown(object sender. KeyEventArgs e) { if (e.txtpno. KeyEventArgs e) { if (e. } private void txtmprice_KeyDown(object sender.Enter) this.Enter) this.txtpname.KeyCode == Keys.Focus().Focus().KeyCode == Keys.txtbore.Enter) this.KeyCode == Keys.txtremain. KeyEventArgs e) { if (e. KeyEventArgs e) { if (e.KeyCode == Keys.txtdate.Enter) this.Enter) this.Focus().KeyCode == Keys.Focus().Enter) this. KeyEventArgs e) { if (e.txtqt. KeyEventArgs e) { if (e.Enter) this.txtvariety.KeyCode == Keys. KeyEventArgs e) { if (e.KeyCode == Keys. KeyEventArgs e) { if (e. } private void txtty_KeyDown(object sender.KeyCode == Keys.KeyCode == Keys.KeyCode == Keys.txtuse.txtty.Focus(). KeyEventArgs e) { if (e.txtloca.Focus().{ } if (e.Focus(). } private void txtuse_KeyDown(object sender. KeyEventArgs e) { if (e.txtaddr. } private void txtcn_KeyDown(object sender.Enter) this.Enter) this.Focus(). KeyEventArgs e) { if (e.Enter) this.btndit.Focus(). } private void txtremain_KeyDown(object sender. } .Enter) this. } private void txtloca_KeyDown(object sender. } private void txtpno_KeyDown(object sender.Focus().

dr["it"].cmbbore.Enabled = false. System.dr = db. this.dr. this.numericqty.Items.Close(). System.txtprs.ComponentModel. while (db.Enter) this. this.Add(db.Enabled = false.dr.Windows. db.txtcn.dr = db.ToString()).com.Enabled = false.private void txtvariety_KeyDown(object sender.Enabled = false.Add(db. while (db. db. db.Enabled = false.dr.ExecuteReader().KeyCode == Keys. while (db.dr["it"].txtarmsno.Read()) { . db. db.Generic. } db.cmbtype. this.Close().Enabled = false.txtmaprice. this.Read()) { if(db.cmbpna. db.cmbclassification.dr. EventArgs e) { this.Enabled = false.dr = db.ToString()!="") this. namespace Bharat_Gun_House { public partial class Returncon : Form { public Returncon() { InitializeComponent().Value = 1.Data.cmbparty.datere.cmbvariety.Read()) { if(db.Items. } db.Forms.cmbcna.Enabled = false. this.dr. this.Text. System.Enabled = false.com.numericqty. } private void Returncon_Load(object sender.txtaddress.ToString()).CommandText = "select itemname from Subitem".CommandText = "select distinct itemname as it from items ".Enabled = false. this.Focus().Collections. this. KeyEventArgs e) { if (e. System.Enabled = false.Enabled = false.ExecuteReader().Enabled = false.CommandText = "select distinct bore as cc from productinsert".com.cmbparty.cmbpna.ExecuteReader().com. System.com.dr["itemname"].com. this.dr["itemname"]. this. this. this.ToString()!="") this.Drawing.Enabled = false. } } } using using using using using using using System. System.cmbclassification. this.

dr["cc"].Text + "'.Close(). db.numericqty.dr["ty"].'" + this.Add(db.dr["ty"]. } db.ToInt32(db. db.cmbclassification.CommandText = "select partyid from party where partyname='" + this.Text + "' and company='" + this.Text + "'and armsno='" + this.cmbbore.cmbtype.txtarmsno.'" + this.com.cmbvariety.cmbpna.Items. db.pty.'"+this.com.dr=db.Text+"'.com.ExecuteNonQuery().Text+"'".CommandText = "select distinct LoderType as ty from productinsert".dr.Text + "'and lodertype='"+this.dr. private void btnsave_Click(object sender." + this.txtmaprice.Text + "'and gunname='" + this.'" + this.cmbcna. while (db." + pid + ".cmbvariety.'" + this.Close().Text + "'and bore=" + this. } db.'" + this.Text + "'".cmbcna. db.Add(db.ToString() != "") this.txtarmsno.Value + ")".'" + this.'" + this.CommandText = "select distinct partyname as ty from party". db.cmbtype. while (db. } db.com.cmbcna.Show("Record Inserted").Text + ".Read()) { if (db.ToShortDateString() + "'.txtaddress.com.Text + "'." + this.cmbpna.dr["cc"].cmbbore.dr = db.ExecuteScalar()).Text + "'.Read()) { if (db.Items. db.Items. while (db.ToString()).dr.cmbclassification.Text + "'and armsno='" + this.com.ToString() != "") this.Text + "and company='" + this.ToString() != "") this.ToString()).dr = db.dr.com. EventArgs e) { this.dr["ty"]. this.cmbpna.Text + "'and type='" + this.com. MessageBox.com.txtaddress.ExecuteScalar()).Text = "".Text + "'. } db.ToString()).'" + this.ToString()).Close().ToInt32(db.cmbclassification. db.dr.CommandText = "update productinsert set qty=qty-" + this.cmbparty.qqty.dr.ExecuteNonQuery().Text + "'"." + this.cmbvariety.ExecuteReader().CommandText = "select distinct company as dd from productinsert ".Text + ".dr["ty"].'" + this.com.ToString()). pid = Convert.com.dr = db.cmbtype. EventArgs e) { try { db. qqty = Convert.Close().Items.cmbbore.dr.Text + "'.cmbparty.Text + "'and bore='" + this.pid.CommandText = "select qty from productinsert where classification='" + this.ToString() != "") this. } int mqty.Close().cmbparty.datere. } catch { } try { db.if (db.dr["dd"]. if (qqty >=1) { db.Text + "'.Items. db.com. } db.txtarmsno.Value + " where classification='" + this. .Text + "'.Text + "'and type='" + this. } private void btncl_Click(object sender.com.Value.ToString() != "") this.Date. db.CommandText = "select distinct Type as ty from productinsert".txtprs.dr["dd"].Add(db.numericqty.Close().com. db.CommandText = "insert into GivenStock values(" + sn + ".Read()) { if (db.Text + "'.Read()) { if (db.dr["ty"].dr.cmbpna. db.Add(db.dr.cmbbore.Text + "'and partyaddress='" + this.ExecuteReader().com.cmbcna. while (db.dr["ty"].ExecuteReader().cmbtype.ExecuteReader().Add(db.Text + "'and gunname='" + this.com.

Text = "".Enabled = true.Text = "". this. } catch { sn = 1.Enabled = true.Text = "".cmbbore. this.cmbcna.ExecuteScalar()).ToString()).txtarmsno.ExecuteReader(). this. db. while (db.dr.this. this.com. this.Close(). db.cmbbore. db.dr.com.Text = "". } .dr. } this. this. private void btnadd_Click(object sender. this. this.Close().cmbclassification.txtarmsno.cmbparty.Text = "".Enabled = true. this.Enabled = true. this.CommandText = "select distinct productty as bb from consinmentreturn ".Add(db. this. } int sn.dr["aa"].cmbclassification.numericqty.Enabled = true.numericqty.dr.dr = db.Enabled = true. sn = Convert. db. this.dr["bb"]. while (db.CommandText = "select distinct borety as cc from consinmentreturn ".Read()) { this.datere. } else { MessageBox.Read()) { this.cmbvariety.Text = "".cmbparty. db.Close(). this. EventArgs e) { this. } db.Items.Add(db. this. db.Enabled = true.Enabled = true.ExecuteReader().Text = "". this.cmbtype.Enabled = true. } db. this.Show("Record does not exist").com.com.Close().ToString()).cmbvariety.CommandText = "select distinct productna as aa from consinmentreturn".dr = db. while (db. } private void btnref_Click(object sender.ToString()). EventArgs e) { try { db.Enabled = true.Text = "".Items.cmbcna.cmbpna.txtmaprice.com.dr["cc"].Items. } catch { MessageBox. } } private void btncl_Click_1(object sender.CommandText = "select distinct companyna as dd from consinmentreturn ". this.ToString()).com. this.Enabled = true.cmbpna.dr.Add(db. db.cmbtype.CommandText = "select max(sno)+1 from GivenStock". } db.txtmaprice.Text = "". } db.com. this.ToInt32(db.dr = db.Close().com.dr.Items.dr = db.ExecuteReader().ExecuteReader(). this.cmbcna. while (db.txtprs.com. this.Add(db.Enabled = true.Enabled = true.cmbparty.dr["dd"].Read()) { this.dr.com.Read()) { this.cmbbore.cmbclassification.Value = 1.Show("Sorry Record does not exist in the Stock"). EventArgs e) { db.dr.txtprs.

} private void cmbtype_SelectedIndexChanged(object sender. this.Show().Focus(). db.Focus().txtmaprice. } private void numericqty_KeyDown(object sender. KeyEventArgs e) { if (e. } db. } private void cmbpna_SelectedIndexChanged(object sender. gsedt. EventArgs e) { this.cmbtype.ToString(). EventArgs e) { db.KeyCode == Keys. } private void txtmaprice_KeyDown(object sender.Enter) this.Focus().numericqty. } private void cmbcna_SelectedIndexChanged(object sender.KeyCode == Keys. this. KeyEventArgs e) { if (e.dr = db. KeyEventArgs e) { if (e. EventArgs e) { this.} private void txtarmsno_KeyDown(object sender.datere.cmbparty.Focus().Text = db.KeyCode == Keys.KeyCode == Keys. } private void button1_Click(object sender.com. KeyEventArgs e) { if (e.Text + "'".txtaddress.com. EventArgs e) { this.cmbbore.txtprs.Close().dr.Focus(). } private void cmbbore_SelectedIndexChanged(object sender. EventArgs e) { this.Focus().CommandText = "select partyaddress from party where partyname='" + this.cmbcna.ExecuteReader().Enter) this.Focus(). EventArgs e) { this.Read()) { this. } } } .dr.Enter) this. } private void datere_ValueChanged(object sender.cmbparty. } private void txtprs_KeyDown(object sender.cmbclassification. if (db. EventArgs e) { FrmGivenStockEdit gsedt = new FrmGivenStockEdit().dr["partyaddress"].Focus().Enter) this. } private void cmbclassification_SelectedIndexChanged(object sender.cmbpna.btnsave.Focus().Close().Focus().Focus(). } private void cmbparty_SelectedIndexChanged(object sender. EventArgs e) { this.

Text = db.armsno='"+this. DataGridViewCellEventArgs e) { try { snum = Convert. Returncon rcn = new Returncon().Text = db.txtaddress.dr["name"].Text+"'.txtbore.Generic.Close(). rcn.com.Text.ToString().Text+"'.using using using using using using using System.Text = db.Text = db.CommandText = "select * from givenstock where sno=" + snum + "".ToString().Text = db.Text+"'.ToString().txtclassification. System.txtproductname.Value).txtparty.ToString().givenStockTableAdapter.txtmaprice.com. as needed.Text = db. System. EventArgs e) { // TODO: This line of code loads data into the 'bharatDataSet.ToString().Show(). this. private void dataGridView1_CellClick(object sender.Drawing.dr["productprice"]. } private void FrmGivenStockEdit_Load(object sender.dr["gunname"].dataGridView1. this.Text = db.dr["bore"].CommandText = "select partyid from party where partyname='"+this.company='"+this. System.com.txtaddress.ToString(). or remove it.com. db.txtprs . this. this.ToString().Text = db.n ame='"+this.dr["givendate"].com.ComponentModel.ToInt32(this.txttype.lodertype='"+this.Close().ToInt32(db.txtaddress. private void btnedit_Click(object sender. System.Rows[e.ExecuteReader(). this.txtqty.txtcomp any.Text+"'.txtclassification. if (db.dr["type"].Collections.GivenStock).Data. db. EventArgs e) { this. this.address='"+this.ToString().Text+"'".RowIndex]. parid = Convert. } db.txttype.dr["lodertype"].Text+"'.Read()) { this.txtcompany.Text = db. db.Text = db.Forms.dr. this. System.bore='"+this.Text+"'.dr["classification"].dr["company"]. this.Cells[0].Text = db.Text+"'.Text+"'and partyaddress='"+this.txtarmsno.dr["marketprice"]. this. You can move. System.ToString(). this.productprice="+this.txtparty.txtprs.dr = db.dr["address"].gunname='"+this.txtarmsno. this.txtvariety.txtvariety.Text = db.txtdate.ExecuteScalar()).bharatDataSet.type='"+th is.ToString(). } int parid. namespace Bharat_Gun_House { public partial class FrmGivenStockEdit : Form { public FrmGivenStockEdit() { InitializeComponent().dr.Text+"'.CommandText = "update givenstock set partyid="+parid+".Fill(this.dr["qty"].txtparty.Text+"'.Text = db.txtbore.ToString(). } int snum.GivenStock' table. this.dr["armsno"].ToString().Windows. this.classification='"+this. EventArgs e) { db.ToString(). } catch { } } private void btnexit_Click(object sender.txtproductname.

Show("Are you Sure ?".Enter) this.com.txtclassification.Enter) this.Text+" where sno="+snum+"". db.YesNo.Text + "'and bore='" + this.txtqty.Text + "'and bore='" + this. KeyEventArgs e) { if (e. cnedit.Text + " where classification='" + this.txtproductname. } private void btndelete_Click(object sender.Enter) this.KeyCode == Keys. EventArgs e) { DialogResult dr = MessageBox.com.txtclassification.Focus(). gedit.txtvariety.Close(). KeyEventArgs e) { if (e. KeyEventArgs e) { if (e. } private void txtclassification_KeyDown(object sender.KeyCode == Keys.com.KeyCode == Keys.KeyCode == Keys. if (dr == DialogResult.Text + " where classification='" + this."Delete". this.com.MessageBoxButtons.ExecuteNonQuery().Text+".Text + "'and type='" + this. FrmGivenStockEdit gedit = new FrmGivenStockEdit().Text+".Yes) { db.Enter) this. } private void txtcompany_KeyDown(object sender.CommandText = "update productinsert set qty=qty+" + this.txtbore.txtmaprice.Enter) this.txtbore.txtdate.givendate='"+this.Focus().Show().txtqty.txtcompany.ExecuteNonQuery().txtparty. } private void txttype_KeyDown(object sender.KeyCode == Keys.ExecuteNonQuery().Text + "'and gunname='" + this.Text + "'and armsno='" + this.Text + "'and lodertype='"+this. } .Text+"'.txttype.txtvariety.Show("Record Updated").txtclassification.txttype.Text+"'".Enter) this.ExecuteNonQuery().Show().qty="+this.CommandText = "update productinsert set qty=qty-" + this. db.Focus().Focus().KeyCode == Keys. KeyEventArgs e) { if (e.Focus().Text+"'".. } private void txtparty_KeyDown(object sender. } private void txtproductname_KeyDown(object sender. db.txtcompany.Focus().txtproductname.txtproductname.Text + "'and company='" + this.txttype.Text + "'and armsno='" + this.Text + "'and lodertype='"+this.MessageBoxIcon.txtbore.com. this.Text + "'and type='" + this. FrmGivenStockEdit cnedit = new FrmGivenStockEdit(). txtqty.Text + "'and gunname='" + this.Close().txtprs.marketprice="+this. KeyEventArgs e) { if (e. db. KeyEventArgs e) { if (e.Focus().CommandText = "delete from givenstock where sno=" + snum + "".Question).txtarmsno.txtcompany.Enter) this. MessageBox.KeyCode == Keys. db.txtarmsno. KeyEventArgs e) { if (e.com.com. } } private void txtarmsno_KeyDown(object sender. } private void txtbore_KeyDown(object sender. db.Text + "'and company='" + this.

MessageBoxButtons.Generic.KeyCode == Keys.Focus(). cl. int qqty. if (db.KeyCode == Keys."Data". } private void txtdate_KeyDown(object sender.Enter) this.Windows. KeyEventArgs e) { if (e.lo.KeyCode == Keys.MessageBoxIcon.Data. } private void txtaddress_KeyDown(object sender. private void btnsave_Click(object sender. } string arno.ExecuteReader(). System. decimal br. this. System.Enter) this. System.Focus().YesNo.Collections.Focus().Focus(). System.txtqty.bharatDataSet. db. gn.btnedit.Forms.Drawing.private void txtprs_KeyDown(object sender. as needed. System. } private void txtqty_KeyDown(object sender. namespace Bharat_Gun_House { public partial class frmReceiveOwnData : Form { public frmReceiveOwnData() { InitializeComponent(). co.com. KeyEventArgs e) { if (e.dr.ty.givenStockTableAdapter.Focus().Fill(this.ComponentModel.GivenStock' table. } private void frmReceiveOwnData_Load(object sender.Enter) this. KeyEventArgs e) { if (e.KeyCode == Keys.txtmaprice.Yes) { try { db.Enter) this. EventArgs e) { // TODO: This line of code loads data into the 'bharatDataSet.KeyCode == Keys. KeyEventArgs e) { if (e.GivenStock). KeyEventArgs e) { if (e.txtdate. System. if (dr == DialogResult. } private void txtmaprice_KeyDown(object sender.com.Read()) { .CommandText = "select * from GivenStock where sno=" + sn + "".dr = db. You can move. } } } using using using using using using using System. EventArgs e) { DialogResult dr = MessageBox.txtaddress.Text. or remove it.Show("Are You Sure To Receive Data ?".Enter) this.Question).

dr["armsno"].ToInt32(db.dr["sno"]).CommandText = "select * from productinsert where classification='" + cl.dr["classification"].dr["company"].com.ToDecimal(db.com.givendate = db.dr["classification"].ToInt32(db.ToInt32(db. db.ToInt32(db.armsno = db. db. r. gn= db.Show("Record can't be Accepted Because it's not match the Record").ToString().address = db.com.dr["givendate"].Sno = Convert.marketprice = Convert. db.ExecuteReader().dr["qty"]).ToString() + "'and bore=" + br + "and company='" + co. } } catch { } } } private void btncl_Click(object sender.ToString().qty = Convert. db.dr["qty"]).com.dr["bore"]).dr["lodertype"]. } catch { } } } } .ToString().dr["gunname"].ToDecimal(db.Read()) { db.dr["gunname"]. r. ty = db.dr["productprice"]).bore = Convert.ToString().Close().type = db.Cells[0].Rows[e. co= db. this. returnStockTableAdapter. if (db.ReturnStock. r.ToString().RowIndex]. db.dr["partyid"]).gunname = db. r.ToString().dr["armsno"].dr["marketprice"]). lo = db.dr.name = db.dr["company"].Close(). r.dataGridView2.ToString().ToString().ReturnStockRow r = bharatDataSet.dr = db. } db.ToString() + "'and gunname='" + gn. MessageBox.ToString() + "'and lodertype='" + lo + "'".Fill(bharatDataSet.ToString(). r.partyID = Convert.GivenStock).ToInt32(db. cl = db.CommandText = "update productinsert set qty=qty+" + qqty + " where classification='" + cl. private void dataGridView2_CellClick(object sender.ToString() + "'and gunname='" + gn. r.ReturnStock).ToString() + "'and armsno='" + arno.productprice = Convert.dr["address"].ToString(). r. } int sn. br = Convert. qqty= Convert. r.ToInt32(db.ToInt32(this.dr.Add(r). } else { db.ToString().ToString().NewReturnStockRow(). db.ToString() + "'and type='" + ty.dr["type"].Close().ToString().dr["name"].Lodertype = db.ReturnStock. bharatDataSet.dr["lodertype"]. DataGridViewCellEventArgs e) { try { sn = Convert.ToString().ToString() + "'and lodertype='" + lo + "'".ToString() + "'and bore=" + br + "and company='" + co. r.Classification = db. r.dr. r. arno = db.dr.ToString() + "'and type='" + ty. r.Value).bharatDataSet. r.com.dr["type"].Rows.Close().givenStockTableAdapter.company = db.ExecuteNonQuery().CommandText = "delete from GivenStock where sno=" + sn + "".ToString(). EventArgs e) { this.ExecuteNonQuery(). r.ToString() + "'and armsno='" + arno.com.Update(bharatDataSet.dr["bore"]).

r. System.dr["location"]. private void FrmtotalConsinmentRecord_Load(object sender.NewreceivedetailRow(). System.type = db. r. or remove it. r.ToInt32(db.ToInt32(db.ToInt32(db. You can move.ToInt32(db.productinsertTableAdapter. r.Drawing.ToString().ToDecimal(db. db. as needed. r. r.ToInt32(db.Read()) { if (ssn != Convert.Generic. receivedetailTableAdapter.dr["company"].ExecuteReader().Rows.partyaddress = db. System. r.Forms. } int ssn.ToInt32(db. this.com. this.CommandText = "delete from receivedetail".receivedetail. r. ssn = Convert. System.GivenStock).GivenStock' table.Update(bharatDataSet.receivedetail.bharatDataSet. db. db.remainingqty = Convert.Fill(this. EventArgs e) { } . r.ToString().Text.Fill(this.CommandText = "Select * from consignment_view". namespace Bharat_Gun_House { public partial class FrmtotalConsinmentRecord : Form { public FrmtotalConsinmentRecord() { InitializeComponent().com.ToString().consignmentid = Convert. // TODO: This line of code loads data into the 'bharatDataSet.subitemsid = Convert.bore = Convert. r.dr[14]).receivedetail).ToString().ToInt32(db.gunname = db. as needed.dr["gunname"].givenStockTableAdapter. You can move.ToString(). r.partyid = Convert.dr["sno"])) { bharatDataSet.ComponentModel.useqty = Convert.Data. bharatDataSet.ToInt32(db.ExecuteNonQuery().dr["classification"].ToString().productinsert' table.dr["marketprice"]).dr["sno"]). } } db. r.ToString().location = db.dr["consignmentid"]). or remove it.ToString().using using using using using using using System.receivedetailRow r = bharatDataSet.dr["qty"].marketprice = Convert. r.Add(r).com.Sno = Convert. EventArgs e) { // TODO: This line of code loads data into the 'bharatDataSet. } catch { } } private void btnRef_Click(object sender. try { db.dr["armsno"].classification = db.ToInt32(db.dr["subitemsid"]). r. r. while (db.dr["useqty"]).armsno = db.ToString().dr["bore"]).com. System.dr["partyaddress"].dr["conreceivedate"]. r.dr["Type"].partyname = db. r.receivedate = db.qty = Convert.Close().dr = db.company = db.Windows.Collections.ToInt32(db.ToString()). System.bharatDataSet.dr.dr["partyname"]. r.dr["sno"]).dr.dr["partyid"]).productinsert).

Close(). System. edt. } private void dataGridView3_CellEndEdit(object sender. System. } private void linkLabel3_LinkClicked(object sender. } e) private void linkLabel1_LinkClicked(object sender. DataGridViewCellEventArgs e) { } private void dataGridView3_CellDoubleClick(object sender.Show(). System. DataGridViewCellEventArgs e) { String aa= this. DataGridViewCellEventArgs e) { string dd = this. LinkLabelLinkClickedEventArgs { FrmGivenStockEdit gr = new FrmGivenStockEdit(). LinkLabelLinkClickedEventArgs { FrmConsignmentedit edt = new FrmConsignmentedit(). System. EventArgs e) { this. this. this.Windows. System. LinkLabelLinkClickedEventArgs e) { Frmstockedit sedt = new Frmstockedit().SelectedCells[0].Collections.Show().SelectedCells[0].Data.Value.ToString().Generic. } e) private void linkLabel2_LinkClicked(object sender.ToString().dataGridView1. DataGridViewCellEventArgs e) { string dd = this.dataGridView2.Value. namespace Bharat_Gun_House { public partial class FrmPurchasedata : Form { public FrmPurchasedata() { .dataGridView3.Close(). this.Close().Show().private void btncan_Click(object sender.Drawing. System. } } } using using using using using using using System.ComponentModel. } private void dataGridView2_CellDoubleClick(object sender. sedt.Text. } private void dataGridView1_CellDoubleClick(object sender.Forms.Close().ToString().SelectedCells[0]. gr.Value.

this.Close().Remove("").cmbguntype.Add(db.dr = db.dr["itname"].dr["itname"].dr. } catch { } try { db.com. this. this.dr.cmbguntype.cmbsuppname.com.ExecuteReader().txtLocation.Enabled = false. db.dr["itname"].txttotalamount.Items.txtpurchasepri. this.txtdueamount.Add(db.ToString()).dr = db.txtBillno. db.txtLocation.Read()) { if (db. this.Enabled = false.Enabled = false.dr["ty"]. this.com.Enabled = false.com.ExecuteReader().Enabled = false.ToString()). db.Read()) { this.dr.txtadd.CommandText = "select distinct Lodertype as ty from productinsert".Enabled = false. } db.Items.CommandText = "select distinct ItemName as it from Items".dr = db.Read()) { if(db.com. while (db.Enabled = false.ExecuteReader().Items.cmbbore.txtmarketprice. } db. while (db.com.dr["it"]. db.Enabled = false.txtpayable. this. this.CommandText = "select distinct type as ty from productinsert".cmbcompany.Items.Enabled = false. this. } db.Enabled = false.Close().Enabled = false. int Sno.Close().ToString()).Enabled = false.Add(db.dr.Items.ToString()!="") this.ExecuteReader().Close(). this.cmbvariety. this.dr. } db.com.ToString() != "") this.CommandText = "select distinct bore as itname from productinsert".Enabled = false.CommandText = "select distinct Company as itname from productinsert".ToString()). this.Enabled = false. this. db.Add(db. db.txtarmno.ExecuteReader().dr["itname"].dr["itname"]. db.Enabled = false.Items. this.cmbtype. this.com. db. } db.numericUpDown1.com. this. this.ToString() != "") this.CommandText = "select distinct ItemName as itname from SubItem".dr = db. this.dr. this.ToString()).Enabled = false.cmbtype.Enabled = false. .com.cmbtype.cmbbore. EventArgs e) { this.dr = db. while (db.cmbclassification. while (db.Read()) { this.dr["itname"].dr.Enabled = false.} InitializeComponent().Add(db.Enabled = false. this.com.Enabled = false. try { db.Read()) { if (db.datetimepurdate. while (db.Close().cmbclassification.txtBillno.dr. db.dr.dr. this.Enabled = false.cmbcompany.txtarmno. private void FrmPurchasedata_Load(object sender.

Billld++.Remove(""). EventArgs e) { db.dr.Text == "") { this.Read()) { this.com.com. if (cnt <= 1000) { db.com.Close().ExecuteScalar()). while (db.YesNo. MessageBoxIcon.cmbbore.cmbvariety.com.cnt. } if (this.db.dr = db.Close().dr. MessageBoxButtons.Text = "0". MessageBoxButtons.Text == "0") { this.com.com.Text = "0". "Limit".dr.ExecuteReader().bcnt.Show("Bullets Limit Exceed".dr["Sn"].com. } db. cnt = Convert. Billld = Convert. if (dr == DialogResult.total. }catch{} } int Billld.CommandText = "select distinct sname as sn from Suppliers". } } } else { DialogResult dr = MessageBox.qt. if (bcnt <= 1000) { fsave(). private void btnsave_Click(object sender.Read()) { this.ExecuteReader().CommandText = "select max(BillID) from ppurchase". while (db.dr = db.ToString()).Yes) { fsave().ToString()). } } } void fsave() { if (this.dr["ty"]. this.cmbsuppname.Items.ToInt32(db.cmbtype. } db. } try { db. } else { DialogResult dr = MessageBox.ToInt32(db.ToInt32(db. bcnt = Convert.PID=0.pur. db.com. if (dr == DialogResult.cmbbore.Show("Gun Limit Exceed".Items.txtmarketprice.Add(db. } .CommandText = "SELECT sum(qty) FROM PRODUCTINSERT WHERE bore>0 and armsno=''".txtmarketprice.Items.Question).dr.Question). } catch { } try { db.YesNo.com. MessageBoxIcon. "Limit".flag.CommandText = "select count(armsno) from productinsert where armsno!=''".ExecuteScalar()).Yes) { fsave().ExecuteScalar()).Add(db.sno.

cmbsuppname. } else { db.Text = "". this.ExecuteReader().Text + "' and bore=" + this.Text = "".Value. sno++. db.Text + "'".Value."+this.Show("Record Inserted").com.'"+linc+"'.Text+".Text+"'.CommandText = "select * from productinsert where Classification='" + this. this.CommandText = "insert into PPurchase values(" + Billld + ". db. MessageBox.Text+".txtmarketprice.'"+valid+ "'.ToShortDateStri ng() +"'.txtdueamount.txtmarketprice.Value+")".ToInt32(this.txtarmno.cmbtype.txtBillno.Text+". this."+Billld+".'"+this.'"+this. .ExecuteNonQuery().'"+this.'" + this.cmbclassification.Text + "' and bore='" + this."+this.Text+"'.Text + "' and armsno='" + this.cmbcompany.Value + ". this.Text = "".com.Text = "".txtpayable.com.com." + this. this.cmbsuppname.'"+this."+this.txttotalamount.Text = "".Text + "'.numericUpDown1. try { db."+this."+this.Text + "' and gunname='" + this. } try { db.'"+this.Close().Text = "". this.Text + "'and supplierid=" + suppid + "".cmbcompany.numericUpDown1.txtreceived. db.txtadd.cmbtype." + SubID + ".txttotalamount.cmbclassification.catch { Billld = 1.cmbcompany.Text + "' and type='" + this.Text+"'.numericUpDown1.cmbtype. this.Close().ExecuteNonQuery().'" + this.Text+"'. this.ToShortDateString() + "'.txtdueamount.com. this."+this .Text+"'." + suppid + ".ExecuteNonQuery(). this."+this.Value = 1. this.Text = "".dr.Text = "". this. } //try { db.'"+this.Text + " and type='" + this.cmbguntype.dr = db.com.Text+"'.cmbguntype. db.Text+".datetimepurdate. } catch { } flag = 1.Text + "' and lodertype='"+this.cmbguntype.Text+"'.Text = "".Text = "".cmbtype.cmbclassification.txttotalamount.Text + " )".txttotalamount. db.'"+this. db.cmbbore."+this." + this.'"+this.Text+"'.Close(). this.cmbbore.com. this.cmbguntype.txtarmno.com.CommandText = "insert into purchasedItems values(" + Billld + ".Text + ")".com. db.cmbclassification.Text = "".Text = "".CommandText = "select max(sno) from productinsert".com.'"+this.Text + "' and company='" + this.CommandText = "update productinsert set qty=qty+" + qt + " where Classification='" + this.Read()) { int qt = Convert. this.Text = "".t xtLocation.ToInt32(db.CommandText = "insert into datapurchase values("+SubID+".Text+"'.Text = "".cmbvariety.datetimepurdate.Text + "' and gunname='" + this. } catch { sno = 1. this.txtadd. db.com. sno = Convert.Text+"' and company='" + this.cmbvariety.Text = "".txtarmno.Text+"'.Date.Value).Text+". db.txtBillno.dr.'"+this.ExecuteScalar()). db.com.'"+this.dr.cmbvariety.txtpurchasepri.txtLocation.dr.cmbbore.txtBillno. if (db.cmbbore.Text+" .Text+".Date.txtp urchasepri." + this.cmbcompany.numericUpDown1.ExecuteNonQuery().

ToString() + "'.CommandText = "insert into datapurchase values(" + SubID + ".ToString()).txtLocation.com. db.'" + valid + "'.txtpayable.txtpayable.Text + ".ToShortDateString() + "'.Text + ".com.Text + "')".Date.cmbtype. } } // catch (Exception ee) { MessageBox.cmbcompany.'" + this.cmbcompany. this.numericUpDown1. this.Value + ")".txtadd.'" + this.Value + ".Text + "'.'" + this.txtBillno.ExecuteNonQuery(). this.Text + "'.txttotalamount.ToShortDateString() + "'.txtarmno.cmbguntype. this.Text + ".txttotalamount.Text + "'.'"+this.ExecuteNonQuery().ToShortDateString() + "'. this. db.cmbvariety.cmbtype. this.Value = 1.'" + this.ExecuteNonQuery().Text+".txtmarketprice.txtarmno.Date. this.Enabled = true.cmbbore.txtLocation. db.cmbtype.Text.datetimepurdate.txtBillno. this.'" + this.'" + this.numericUpDown1.cmbcompany.ExecuteNonQuery().numericUpDown1.txtmarketprice.cmbguntype.cmbsuppname. this." + SubID + ".Text + ".Text + "'.Text + "'.txtLocation.Enabled = true. this.Text = "".Enabled = true.cmbbore.CommandText = "insert into productinsert values(" + sno + ".'" + this.Text = "".'" + this." + this.txttotalamount.txtLocation." + this.com.Enabled = true.txtBillno.'" + this.cmbsuppname. this.'" + linc + "'. db. this.ToString() + ". this.txtpurchasepri.Text+"'. EventArgs e) . MessageBox.txtarmno.'" + this.Text + "'.cmbvariety.Enabled = true.txttotalamount.Text + ". this. EventArgs e) { this.Enabled = true.'" + this.Text + "'.Text+"'.txtpurchasepri. this.Text = "".cmbclassification. txtLocation.Value + ".com.Enabled = true.Enabled = true. this.Enabled = true.txtreceived.Text = "".Text = "".cmbclassification."+this. this. this.Text = ""." + suppid + "." + this.Text = "".com.cmbvariety.numericUpDown1." + this.txtpurchasepri.txtdueamount.Text.Text+".Enabled = true.txtadd. this.db.txtmarketprice. this.cmbclassification.Enabled = true.Text + "'.ToString() + "'.txtdueamount.'" + this." + this.Enabled = true. this. this.'"+this.Text + " )"."+this.cmbbore.Value. this.Enabled = true. } private void btnclose_Click(object sender. //} } private void btnadd_Click(object sender." + Billld + ".txtBillno.'" + this.Text + "'." + SubID + ". this.Text + "'.cmbclassification.Text + ")".Text + "'.txtdueamount.txtBillno." + this.Show(ee.Text + ".com.txtpurchasepri. db.'" + this. this.Text = "".Text = "".CommandText = "insert into PPurchase values(" + Billld + ". this.datetimepurdate.'" + this.Text = "".Text = "".txtmarketprice." + this.Enabled = true. this." + this." + this.com.Enabled = true.Text = "".cmbtype.numericUpDown1. this.Enabled = true.'" + this.txtadd. db.Date. this.com.Text = "". this." + PID + ".cmbguntype.cmbguntype." + this.cmbcompany.CommandText = "insert into purchasedItems values(" + Billld + ".txtpayable.'" + this.Text.Text = ""." + suppid + ".cmbsuppname.Value.Enabled = true. this.cmbbore.Text + "'.txttotalamount.datetimepurdate.Value.'" + this." + this. this.Show("Record Inserted")." + this. this. this.Enabled = true.Enabled = true." + this.txtarmno.txtarmno.Text + "'.'" + this.Text + ". db. this.Text = "".datetimepurdate.Enabled = true.Enabled = true.

ToInt32(db. } private void cmbbore_SelectedIndexChanged(object sender.Close(). KeyEventArgs e) { if (e.Focus(). } private void txtLocation_KeyDown(object sender.KeyCode == Keys. private void cmbcompany_SelectedIndexChanged(object sender.Focus(). EventArgs e) { this.Focus(). } int SubID. sup.cmbsuppname.Focus(). } private void datetimepurdate_ValueChanged(object sender.cmbcompany. LinkLabelLinkClickedEventArgs { } FrmSupplier sup = new FrmSupplier(). private void cmbguntype_SelectedIndexChanged(object sender.Enter) this.KeyCode == Keys.Focus(). this.cmbclassification.ExecuteScalar()). ItemID = Convert.com.txtLocation.KeyCode == Keys.cmbguntype.Show(). EventArgs e) { db.cmbtype.Text+"'". this.cmbguntype. SubID = Convert.{ } e) this.com.ExecuteScalar()).Focus(). pr. EventArgs e) { this.Focus().Show(). this.Enter) this.datetimepurdate.txtarmno. KeyEventArgs e) { if (e. } private void txtpurchasepri_KeyDown(object sender.ToInt32(db. } private void txtarmno_KeyDown(object sender.Focus(). EventArgs e) { this.txtmarketprice.com.CommandText = "select SubItemsID from SubItem where ItemName='"+this. KeyEventArgs e) { if (e. EventArgs e) { this.Text + "'". EventArgs e) { db.Enter) this. } int ItemID.Close().CommandText = "select ItemID from Items where ItemName='" + this. private void linkLabel1_LinkClicked(object sender.com. } private void cmbtype_SelectedIndexChanged(object sender. private void cmbclassification_SelectedIndexChanged(object sender.Focus(). } private void txtmarketprice_KeyDown(object sender.cmbbore. KeyEventArgs e) . } e) private void linkLabel2_LinkClicked(object sender. LinkLabelLinkClickedEventArgs { purchasedataedit pr = new purchasedataedit().

dr. int due = pa . EventArgs e) { int pa = Convert.Enter) this.KeyCode == Keys.CommandText = "select * from Suppliers where Sname='" + this.ToInt32(this. } db.Focus().Focus().numericUpDown1.Text = db. EventArgs e) { pur = Convert.numericUpDown1.txtreceived. } private void txttotalamount_Enter(object sender. } private void txtdueamount_Enter(object sender. } private void txtpayable_KeyDown(object sender.KeyCode == Keys.com. this.Enter) this. } private void txtmarketprice_KeyDown_1(object sender.Focus().ExecuteReader().Enter) this.Enter) this.Enter) this. . db. private void txtBillno_KeyDown(object sender.Text). KeyEventArgs e) { if (e.cmbsuppname.Enter) this.txtmarketprice.dr["licenceno"].ToString(). KeyEventArgs e) { if (e.txtpurchasepri.txtadd.dr["validdate"].KeyCode == Keys.ToString().Text).dr["Saddress"]. } private void txtpurchasepri_KeyDown_1(object sender. int re = Convert.Focus(). EventArgs e) { db.txtpayable. } int suppid. valid = db.ToInt32(this. KeyEventArgs e) { if (e.txtBillno.Focus().KeyCode == Keys.Read()) { suppid = Convert.Enter) this.txtpayable.txttotalamount.valid. } private void txttotalamount_KeyDown(object sender. this.dr["SupplierID"]).Enter) this.com.datetimepurdate.KeyCode == Keys.Focus(). linc = db. KeyEventArgs e) { if (e.dr.txtdueamount. if (db.ToString().KeyCode == Keys. this.Focus().Text). KeyEventArgs e) { if (e.KeyCode == Keys. } private void numericUpDown1_KeyDown(object sender.Focus().Close().Focus().Text + "'". String linc. private void cmbsuppname_SelectedIndexChanged(object sender.txtpurchasepri.txtreceived.ToString(). KeyEventArgs e) { if (e.ToInt32(this. } private void txtdueamount_KeyDown(object sender.dr = db.{ } if (e.re. KeyEventArgs e) { if (e.Text = due.KeyCode == Keys.ToInt32(db.

private void btnedit_Click(object sender.payable=" + this.Text + "'.txtdueamount. db.Text+"'".CommandText = "update datapurchase set armsno='" + this.ComponentModel. System.ExecuteNonQuery(). db.txtpurdate.Text.Forms.com. db.CommandText = "select supplierid from suppliers where sname='"+this.Fill(this.type='" + this.ToInt32(db. namespace Bharat_Gun_House { public partial class purchasedataedit : Form { public purchasedataedit() { InitializeComponent().txtadd.txttype.Text + "'.Value).marketprice=" + this.ToInt32(db.Text+"'and saddress='"+this.sname='" + this.Data.billno='" + this.LoderType='"+this. subid = Convert.txtbore. KeyEventArgs e) { if (e.txtdue.received="+this.ExecuteScalar()).classificatino='" + this.Text+" where billid=" + bid + "".Text + "'.txtclassi.purchaseprice=" + this.numericUpDown1.txtrecevied. this.Windows. private void txtreceived_KeyDown(object sender.Text + "'.company='" + this. .txtpurdate.com.Text + ".com.CommandText = "select itemid from items where itemname='"+this.Text + ". as needed.saddress='" + this.dueAmount=" + this.dataPurchase).Text +".txtbillID. System.} qt = Convert.location='" + this. System.Text + ".ExecuteNonQuery().com.ExecuteScalar()). System.Enter) this.txtvariety.dataPurchase' table.txttotalamoun.com.totalAmount=" + this.txtqty.CommandText = "update purchaseditems set qty=" + this.com.txttotalamoun.CommandText = "update ppurchase set billno='" + this.txtlocation.txtbillno. System.Text + "'.Text = total.Text + "'. You can move.ToInt32(this.*/ db.com.txtsuppna. } int subid=0.Text + "'.txtPayable.Text + "'.CommandText = "select Subitemsid from Subitem where itemname='"+this.gunname='" + this.ToString().Text + "'.Text + ".Drawing.bharatDataSet.Text+"'". or remove it.com. EventArgs e) { // TODO: This line of code loads data into the 'bharatDataSet. } private void purchasedataedit_Load(object sender.validdate='" + this.txtlicence.Subitemsid=" + subid + " where billid=" + this.Collections.KeyCode == Keys.txttotalamount.Text + ".txtadd.txttotalamoun.Text + "".com.Text+"'".com.totalamount=" + this.itemid=0.txtsuppna.bore=" + this.billdate='" + this.Generic.price=" + this.Text + "'.Text + ". EventArgs e) { try { db.Focus().txtpna.Text + "'.Text + "'.txtvalid. } } } using using using using using using using System. this.billdate='" + this.dataPurchaseTableAdapter.ExecuteScalar()). total = pur * qt.com. db.supid.txtbillno.Text+"'. db. db.ExecuteNonQuery().supplierid=" + supid + " where billid=" + bno + "".com. itemid = Convert. supid = Convert.lincenceno='" + this.Text + ".Text + "'.txtpna. /*db.ToInt32(db.txtpurchasepri.txtmarketpric. System.txtcompy.Text + "'.txtarmno.Text + ".txtclassi.

txtpurdate.Text + "'.Text = "". this.txtpurdate.com.armsno='" + this.Text + " and marketprice=" + this.Text + "'.Text = "".Text = "". DialogResult drs =MessageBox.ToInt32(db.txtpna. MessageBox. this.CommandText = "select supplierid from suppliers where sname='" + this.Text = "". subid = Convert. this. this.com.Close().CommandText = "delete from ppurchase where billid=" + this.Text = "".Text = "".com.com. db. this.Text + ".txtmarketpric.com. db.txtvariety.txtclassi.txtadd.Text + "".Text = "". MessageBoxIcon. EventArgs e) { try { db. this.Text = "". purchasedataedit pr = new purchasedataedit(). this.Text + "'".com. } } int suppid.supplierid=" + supid + " where subitemsid=" + subid + " and supplierid=" + supid + "". this.gunname='" + this.txtpurchasepri.Text = "". this. db.txtarmno.Show().Text+"' and purchaseprice=" + this.ExecuteNonQuery().txtpna.Yes) { /*db.txtsuppna. if (drs == DialogResult.ExecuteScalar()).classification='" + this.CommandText = "delete from productinsert where Subitemsid=" + subid + " and gunname='" + this.com. this.txtadd.txtbore.ExecuteNonQuery().type='" + this.Lodertype='"+this.Text = "". this.Question).company='" + this.txttype. this.Text + "' and armsno='" + this. this.txttotalamoun.Text + "'.txtcompy.txtclassi.txtpurchasepri. this.Text + "' and lodertype='"+this.com. private void btndel_Click(object sender.Text + "' and supplierid=" + supid + "". this.Text + ".Text = "".Text = "".Text = "".ToInt32(db.Text + "'.marketprice=" + this. this.CommandText = "delete from purchaseditems where billid=" + this. purchasedataedit pr = new purchasedataedit(). db.txtarmno.Text + "' and bore=" + this.db. this.YesNo.Text = "".*/ db.txtpna.txtarmno.Close().Text = "".txttype. } catch (Exception ee) { MessageBox. supid = Convert. this. this.txtbillno.ExecuteNonQuery(). MessageBoxButtons.txtbillno.txtmarketpric.ExecuteNonQuery().Text = "".txttype.txtcompy.com.txtpurchasepri. db.Text + "'and saddress='" + this.Text + "'.Text = "".ExecuteScalar()).Text = "".com.txtcompy. "del".txtbore.Text + "'".txtadd.txtsuppna.txtarmno. this.Text = "".txtclassi.txtsuppna.bore=" + this. .txtvariety. this.txtpurchasepri.com.txttype.Text + " and type='" + this.Text = "".txtbillID.Text+"'. this.Show("updated").txtpna.Text = "".com. pr.txtqty.com.ToString()).Text = "". this. this. this.Show("Are u Sure to Delete".purchaseprice=" + this.txtpna.txtbillID.Text + "".Text = "".txtclassi. db.txtcompy.CommandText = "update productinsert set Subitemsid=" + subid + ". this.txtqty.Show(ee. this.txtbore. db.Text = "".CommandText="delete from datapurchase where billid="+bid+"".Text = "".com.txtpurchasepri.txtbore.txttotalamoun.txtvariety.Text = "". this.Text = "". this.Text + " and classification='" + this.ExecuteNonQuery().CommandText = "select Subitemsid from Subitem where itemname='" + this.Text + "' and company='" + this.Text = "". db. this. this.Text + ".txtmarketpric.Text = "".

Text = db.txtarmno. this.ToString().ToString(). this.ToString().txtbillno. this.ToString().txtdue.ToString(). this.dr["billno"].Text = db.ToString(). this. this.KeyCode == Keys.dr. if (db. } db.dr["Type"].Text = db.KeyCode == Keys.dr["bore"].txtqty.txtpurchasepri.txtbore.dr["payable"]. this. this.Enter) this.ToString().txtrecevied.txtbillno.Text = db.ToString(). this. KeyEventArgs e) { if (e. db.txtlicence.dr["company"]. KeyEventArgs e) { if (e.txtarmno.dr["purchaseprice"]. KeyEventArgs e) { .Text = db. this.dr["gunname"].Close().Text = db.Text = db.ToString().ToString(). this. } private void txtbore_KeyDown(object sender.txtsuppna. this.Text = db.Text = db.Focus().ToString().dr["Qty"]).Text = db.ToString(). DataGridViewCellEventArgs e) { try { bid = Convert.Text = db.Text = db.Close().dr.txttotalamoun.dataGridView1.Enter) this.Text = db.dr["marketprice"].ToString(). } private void txtcompy_KeyDown(object sender.Rows[e. } catch { } int bid.Cells[15]. this.Text = db.txtcompy. this. private void dataGridView1_CellClick(object sender. this.txtpna. } private void txtpna_KeyDown(object sender.txtpurdate.Text = db.ToString().Focus(). this.Text = db.Text = db.KeyCode == Keys.dr["billdate"].Text = db. KeyEventArgs e) { if (e.com. this.dr = db.ToString().dr["received"].dr["saddress"]. } catch { } } private void btncancel_Click(object sender.dr["totalAmount"].dr["Lodertype"].} } pr.CommandText = "select * from datapurchase where BillID=" + bid + "".Read()) { this. } private void txtarmno_KeyDown(object sender. db.txtlocation.txtPayable.dr["validdate"].dr["armsno"].dr["billno"].ExecuteReader().Focus(). EventArgs e) { this.ToString().Value).Enter) this.txtpna.txtcompy.dr["classificatino"].com.dr["sname"].Text = db.txtadd.txtvariety. this. this.txttype.Text = db.dr["lincenceno"]. this.txtclassi.dr["DueAmount"].txtmarketpric.ToString().ToString().Text = (db. KeyEventArgs e) { if (e.dr["location"]. this.ToString(). } private void txtclassi_KeyDown(object sender.Focus().KeyCode == Keys.Show().txtbore.Enter) this.ToString().RowIndex].Text = db.ToInt32(this.ToString().txtvalid.ToString().

txtlicence.Focus().Enter) this.Enter) this. KeyEventArgs e) { if (e.Focus().Focus().KeyCode == Keys.Enter) this.txttype.txtpurdate.Enter) this.KeyCode == Keys.KeyCode == Keys. KeyEventArgs e) { if (e.Focus().txttotalamoun. } private void txtbillID_KeyDown(object sender. } .Focus(). KeyEventArgs e) { if (e.txtbillno.if (e.KeyCode == Keys.KeyCode == Keys. KeyEventArgs e) { if (e.Focus().Enter) this.txtsuppna.KeyCode == Keys.KeyCode == Keys. KeyEventArgs e) { if (e. KeyEventArgs e) { if (e. KeyEventArgs e) { if (e. KeyEventArgs e) { if (e. } private void txtvalid_KeyDown(object sender. KeyEventArgs e) { if (e.KeyCode == Keys.btnedit.txtqty.KeyCode == Keys. } private void txttype_KeyDown(object sender.Enter) this. } private void txtpurdate_KeyDown(object sender.Enter) this.txtvalid.Enter) this. KeyEventArgs e) { if (e.Enter) this.txtmarketpric. } private void txtlicence_KeyDown(object sender. } private void txtmarketprice_KeyDown(object sender.Focus().Focus(). } private void txtadd_KeyDown(object sender.txtpurchasepri.Focus().Enter) this.Enter) this. } private void txttotalamount_KeyDown(object sender.Focus(). KeyEventArgs e) { if (e.Enter) this. KeyEventArgs e) { if (e.KeyCode == Keys.KeyCode == Keys.Enter) this.txtadd. } private void txtqty_KeyDown(object sender. } private void txtpurchasepri_KeyDown(object sender. } private void txtsuppna_KeyDown(object sender. } private void txtbillno_KeyDown(object sender.txtvariety.Focus().KeyCode == Keys.Focus().Focus().KeyCode == Keys.

} private void groupBox2_Enter(object sender.KeyCode == Keys.Enter) this.KeyCode == Keys. KeyEventArgs e) { if (e. System.Enter) this.Focus(). } private void txtPayable_KeyDown(object sender.private void txtpurchasepri_KeyDown_1(object sender.txtlocation.Focus().Forms. EventArgs e) .Enter) this.Enter) this.KeyCode == Keys. } } } using using using using using using using System. KeyEventArgs e) { if (e. } private void txtvariety_KeyDown(object sender. KeyEventArgs e) { if (e.Focus(). System.txttotalamoun. namespace Bharat_Gun_House { public partial class FrmSupplier : Form { public FrmSupplier() { InitializeComponent().Focus().Windows. System. System. KeyEventArgs e) { if (e.Generic.Enter) this.txtPayable. KeyEventArgs e) { if (e.KeyCode == Keys. KeyEventArgs e) { if (e. } private void txtqty_KeyDown_1(object sender.txtbillno. } private void txtdue_KeyDown(object sender.txtpurdate. } private void txttotalamoun_KeyDown(object sender.Focus().Data.Focus().Enter) this.Focus().Enter) this.KeyCode == Keys. KeyEventArgs e) { if (e.Collections.txtdue.KeyCode == Keys.KeyCode == Keys. } private void txtlocation_KeyDown(object sender. KeyEventArgs e) { if (e.Drawing.Enter) this. System.txtmarketpric.KeyCode == Keys.btnedit.Focus(). System.Text.ComponentModel. } private void txtmarketpric_KeyDown(object sender.

'" + this.txtsupname.txtid.com.Text + "'. this.cmbstate.txtsupname.Text = "". ccid = Convert.txtaddress.com.Text + "'.Text = ""." + stateid + ". this.'" + this.Text + "'.com.com.'" + this.'" + this. this.Text = "".Text = "". sup.Text + "')".txtlino.CommandText = "insert into Cities values(" + cityid + ". db.Close(). db.Text + "'. FrmSupplier sup = new FrmSupplier(). db.cmbstate.Show().Text = "".ToInt32(db.com. this.'" + this. } catch { } } else { db.Text = "".Text + "'.CommandText = "select * from cities where stateid="+ssid+" and cityid="+ccid+"".ExecuteNonQuery(). db.txtcontact. try { db.txtvalid.txtcontact.cmbcity.Text = "".cmbcity.Text + "'.Text = "".com.Text == "") { this.Text + "'.Text = "".com.dr.ToInt32(db.Text + "'.cmbcity.CommandText = "insert into Suppliers values(" + this.Text = "".ExecuteNonQuery(). MessageBox.Text + ".txtid.'" + this. this. this.Text + "')".'" + this.Close(). this. private void btnsave_Click(object sender.'" + this.txtaddress. MessageBox.Text + "'.Show("Record Inserted").dr.cmbcity.'" + this.cmbstate.'" + this. } catch { } this.Text + "')". db.txtvalid.Text + "'".Text = "".CommandText = "select cityid from cities where cityname='" + this.Text = "0". this.com.Text = "". this.com.'" + this.txtcontact.CommandText = "insert into Suppliers values(" + this.txtsupname.Text + "')".txtvalid.Text = "". this. this.Text = "". if(db. this.Text+"'". db. this.com.com. this.cmbcity. db.Text + ".txtcontact.Text = "".Text = "".ExecuteScalar()).txtaddress. db. ccid.Show("Record Inserted"). } } private void btndel_Click(object sender.'" + this.cmbstate.Text + "'.ExecuteNonQuery().'" + this.com.txtcontact.cmbstate.'" + this.cmbstate.txtsupname. } db.dr = db. this.'" + this.Read() ) { try { db.txtvalid.txtlino.cmbcity.'" + this. EventArgs e) { .com.txtlino. db.txtid. EventArgs e) { if (this. this.ExecuteScalar()). db.com.{ } int ssid.CommandText = "select stateid from states where statename='"+this.ExecuteNonQuery().CommandText = "insert into states values(" + stateid + ". ssid = Convert.txtlino.ExecuteReader().dr.txtaddress.Text + "'.Close().txtcontact.txtid.Text + "'.

com.txtid.com.KeyChar == 13) { this. stateid++. cityid++.ExecuteScalar()). KeyPressEventArgs e) { if (e.com. st.com. supplierid++.KeyChar == 13) { } } .txtlino.ToString()).ExecuteScalar()).com.ToInt32(db.Enabled = false. cityid = Convert. private void txtsid_KeyPress(object sender.} private void btncan_Click(object sender.txtsupname.CommandText = "select max(supplierid) from suppliers".ExecuteScalar()). } } private void txtlino_KeyPress(object sender.ToInt32(db.KeyChar == 13) { } } private void txtadd_KeyPress(object sender.CommandText = "select distinct statename as st from States".Text = supplierid. KeyPressEventArgs e) { if (e.Close(). } db.Close().com.com. KeyPressEventArgs e) { if (e. EventArgs e) { this.Items. } int supplierid. db. this.} try { db.ToString(). } } private void txtsup_KeyPress(object sender. } catch { cityid = 1. } db.txtid.ExecuteReader().dr = db. } catch { } try { db.Add(db. while (db.Focus(). KeyPressEventArgs e) { if (e.Focus(). }catch{stateid = 1.CommandText = "select max(stateid)from States". supplierid = Convert.com. Frmproductinsert st = new Frmproductinsert().Show(). EventArgs e) { try { db. stateid = Convert.Read()) { this. this.CommandText = "select max(cityid)from cities".cmbstate.dr.dr["st"]. private void FrmSupplier_Load(object sender. } int stateid.ToInt32(db.KeyChar == 13) { this.cityid.dr.

KeyEventArgs e) { if (e.cmbstate. } } private void cmbstate_KeyPress(object sender. } private void txtcontact_KeyDown(object sender. KeyPressEventArgs e) { if (e.txtsupname.Enter) this. } private void txtvalid_KeyDown(object sender.Enter) this.KeyCode == Keys.Focus().Close().txtlino.Enter) this.KeyChar == 13) { this. KeyPressEventArgs e) { if (e. . KeyPressEventArgs e) { if (e.private void datetime_KeyPress(object sender.KeyCode == Keys. KeyEventArgs e) { if (e.Enter) this.KeyChar == 13) { } } private void cmbcity_KeyPress(object sender.Focus().Focus().Focus().txtvalid. } private void txtid_KeyDown(object sender. KeyEventArgs e) { } if (e.KeyChar == 13) { } } private void txtcont_KeyPress(object sender.Enter) this. st. KeyPressEventArgs e) { if (e.txtcontact.KeyChar == 13) { } } private void txtpin_KeyPress(object sender. KeyPressEventArgs e) { if (e.KeyCode == Keys. } } e) private void linkLabel1_LinkClicked(object sender. private void txtlino_KeyDown(object sender.KeyCode == Keys.txtaddress. LinkLabelLinkClickedEventArgs { Stockinsertfrm st = new Stockinsertfrm().Focus().Show(). } private void txtsupname_KeyDown(object sender. KeyEventArgs e) { if (e.Focus(). KeyEventArgs e) { if (e.KeyCode == Keys.Focus().btnsave. st.KeyChar == 13) { this.

Focus().dr = db. System.cmbcity.Focus(). db. int sid = Convert.CommandText = "select * from cities where stateid=" + sid + "".Text + "'.CommandText = "select stateid from states where statename='" + this.com.btnsave.Close().Read()) { this.com.dr["CityName"]. this. } private void txtaddress_KeyDown(object sender.dr. EventArgs e) { db. namespace Bharat_Gun_House { public partial class FrmParty : Form { public FrmParty() { InitializeComponent().Data.cmbcity. while (db. } db.KeyCode == Keys.KeyCode == Keys. System. System.com.Text + "')".txtpartyadd.Text.Text + "'".cmbstate.com. } catch { } } private void txtpincode_KeyDown(object sender.Clear(). System.ExecuteNonQuery().Show("Record Inserted").'" + this.txtpartyname. db. db.com.Drawing.dr.Items.ToInt16(db.txtpartyadd. } } using using using using using using using System.Focus().Add(db. EventArgs e) { try { this.Forms. db. EventArgs e) { this.Text = "".txtaddress. System.Enter) this.} private void cmbstate_SelectedIndexChanged(object sender.ComponentModel.ExecuteScalar()).txtpartyname.Collections.Enter) this.CommandText = "insert into party values('" + this. System. MessageBox.Items.com. KeyEventArgs e) { if (e.ExecuteReader().cmbcity.Text = "".Generic. } private void cmbstate_DropDownClosed(object sender.'" + this.Windows. } int cid.txtparty. . KeyEventArgs e) { if (e.Text + "'. } private void pictureBox3_Click(object sender.ToString()). this. EventArgs e) { } private void btnsa_Click(object sender.

bharatDataSet. private void FrmParty_Load(object sender. this.party' table. You can move. MessageBox.com. or remove it. partyid = Convert. EventArgs e) { // TODO: This line of code loads data into the 'bharatDataSet.txtpartyadd. private void btncan_Click(object sender. cn.CommandText = "update party set partyaddress='" + this. ConsinmentAccept cn = new ConsinmentAccept().Enter) this.Text = "".Text. } private void dataGridView1_CellDoubleClick_1(object sender. using System. DataGridViewCellEventArgs e) { } private void btnedit_Click(object sender.ToString().Collections.party).Enabled = false.Forms.Fill(this.Generic.Enter) this. EventArgs e) { try { db.ToInt32(db.txtAddress. KeyEventArgs e) { if (e.Data. } } private void txtpartyname_KeyDown(object sender.txtpartyid.partyTableAdapter.ExecuteScalar()). } catch { partyid = 0. as needed. db.Focus().Text + "' where partyid=" + this.Show("Record Updated"). } private void txtpartyadd_KeyDown(object sender.Focus(). EventArgs e) { try { db. using System. KeyEventArgs e) { if (e.txtparty.ComponentModel.partyname='" + this. using System.ExecuteNonQuery(). } private void PartyEditRecord_Load(object sender.txtpartyid.com.Windows.txtparty.Text = partyid. using System. partyid++.Text = "".KeyCode == Keys. namespace Bharat_Gun_House { public partial class PartyEditRecord : Form { public PartyEditRecord() { InitializeComponent().txtname.CommandText = "select max(partyid) from party". using System.txtparty. .Show().KeyCode == Keys. EventArgs e) { this. using System. } int partyid. } }} using System.Drawing.btnsa.Text + "".} this.Close().com. this. this.com. this.Text + "'.

DataGridViewCellEventArgs e) { try { int pana = Convert.dr.txtpartyid.ExecuteReader().Value).Text = "".CommandText = "select * from party where partyid='" + pana + "'".Text = "". this.dr = db.KeyCode == Keys.com. db. db.Show("Record Deleted". } } catch { } } private void btncancel_Click(object sender.txtname.dr. this. } private void dataGridView1_CellClick(object sender.Text = db.txtAddress.Text = db.Yes) { db.btnedit. if(dr==DialogResult.txtAddress.ToInt32(this. this.Text = "". } db.YesNo.dr[1]. MessageBoxButtons. } private void txtname_KeyDown(object sender.ToString().Focus().Rows[e.txtpartyid. } } } . this.dataGridView1.Enter) this.Question).txtname.Enter) this.txtpartyid. pr.CommandText = "delete from party where partyid=" + this. this.Text = "".ToString(). EventArgs e) { this.Text + "".txtname.Focus().RowIndex]. KeyEventArgs e) { if (e.ToString().dr[2]. pr.KeyCode == Keys.Close().Close().Cells[0]. this.Close(). this. if (db.dr[0]. } catch { } } private void txtpartyid_KeyDown(object sender. this. PartyEditRecord pr = new PartyEditRecord().Text = "".com. EventArgs e) { try { DialogResult dr = MessageBox. db.ExecuteNonQuery(). KeyEventArgs e) { if (e. private void btndel_Click(object sender. "del". PartyEditRecord pr = new PartyEditRecord().Focus().Text = db. MessageBoxIcon.com.KeyCode == Keys.txtAddress.Show(). } private void txtAddress_KeyDown(object sender.Show().} } catch { } this.com.Enter) this. KeyEventArgs e) { if (e.txtAddress.txtname.Close().Read()) { this.

txtlino.dr["saddress"].ComponentModel.dr = db.Text = db.ToString(). System.Close().txtvalid.txtlino.ToString(). this.txtadd. this.dr.txtcontact. as needed. System.txtlino. this.Enabled = false.dr["validdate"].txtadd. this.Generic.ToInt32(this.ToString(). DataGridViewCellEventArgs e) { this.txtvalid.Enabled = false.ToString(). EventArgs e) { .txtvalid.txtstate.Text = db. this.Fill(this.Enabled = true.dr["contact"].ToString(). System.Text = db.Text.Rows[e. this.Suppliers' table.txtstate. this. or remove it. this. EventArgs e) { // TODO: This line of code loads data into the 'bharatDataSet.txtid. "". You can move. this.RowIndex].Enabled = true. System.txtcontact.Text = db. db. this.Enabled = false.com. } int ssid.dr["sname"].txtadd.Text = db.txtsup. namespace Bharat_Gun_House { public partial class FrmSuppliereditRe : Form { public FrmSuppliereditRe() { InitializeComponent().Enabled = true. this.Windows. this.txtid.Collections. System.Drawing.Text = db.ExecuteReader(). this.bharatDataSet.Data. if (db.dr.Value). } private void dataGridView1_CellClick(object sender.dr["licenceno"].Enabled = true.Enabled = true.Enabled = false. this. } } catch { } private void btnEdit_Click(object sender. this.using using using using using using using System.txtstate.CommandText = "select * from Suppliers where supplierid=" + ssid + db.dr["state"]. System.txtcontact. this.Suppliers).Enabled = false.suppliersTableAdapter.Forms.dataGridView1. } db.Enabled = false. } private void FrmSuppliereditRe_Load(object sender.txtcity.dr["supplierid"].txtcity.Text = db.Close().ToString(). this.Read()) { this.Cells[0]. EventArgs e) { this.Text = db. try { ssid =Convert.dr["City"].ToString().txtsup.Enabled = true.ToString(). this. this.Enabled = true.txtcity.Enabled = false. private void btncan_Click(object sender. this.Enabled = false.com.txtsup. this. this.

KeyCode == Keys.KeyCode == Keys.Focus().txtcity.txtvalid. this.state='" + this. this.txtadd.txtlino.Enabled = false.Text + "'.Text + "". this.Text = "".Text = "".Enabled = false.txtcity. this.Enabled = false.Enabled = false.txtvalid.Enabled = false. this.try { db.Text = "".txtadd.txtlino. this. } private void txtvalid_KeyDown(object sender. } private void txtcontact_KeyDown(object sender. KeyEventArgs e) { if (e.txtlino. this.txtsup.Text + "'".txtvalid.Text + "'.txtcity. this. db. this.Text = "".Enabled = false.Enter) this.Enabled = false.Text + "'.txtadd.ExecuteNonQuery().txtsup.saddress='" + this.txtid.txtstate. this. this.licenceno='" + this.CommandText = "update Suppliers set sname='" + this. this. this.txtlino. this.Text + "'.city='" + this. KeyEventArgs e) { if (e.Enter) this.txtvalid.Enabled = false.Enabled = false.txtcontact. this. this.Text = "".ExecuteNonQuery().Text = "". this.Text = "".txtlino.KeyCode == Keys.txtlino.Text = "".Enabled = false.txtsup. this. this.Enabled = false.Text = "".Text = "". this.Enter) this.Text = "".Enabled = false.com.Enabled = false.txtcontact.txtstate.Text = "".contact='" + this. this. this.txtid.Enter) this. } catch { } } private void txtid_KeyDown(object sender.Text = "".txtsup.txtvalid.CommandText = "delete from Suppliers where supplierid='" + this.txtcontact.Text = "".txtadd. KeyEventArgs e) { if (e. db. this.txtadd.Text = "".txtcontact.Focus(). this. this.validdate='" + this.Text = "".txtid. EventArgs e) { try { db. this. } private void txtlino_KeyDown(object sender.txtadd.txtstate. this.Text + "'.com.Text + "'.Focus().txtcity. this. } catch { } } private void btndel_Click(object sender. this. this.com. this. this.Text = "".KeyCode == Keys.txtadd.txtvalid.Text + "'.txtid.Enabled = false.txtstate.txtstate.txtsup.txtsup. KeyEventArgs e) { if (e.Text = "".com.txtadd.txtcity.txtcontact. . where supplierid=" + this.Focus().

KeyEventArgs e) { if (e.Right < 9) this.Focus(). } } } using using using using using using using System. System.KeyCode == Keys. } int sno=0.com.Right > 0 && this. } private void btncan_Click_1(object sender.Right. EventArgs e) { this.Focus().Enter) this.txtsno.CommandText = "select max(sno) from orders". } private void timer1_Tick(object sender.Data.txtstate.Focus().label1. System. System.Windows. try { db.label1.txtcontact. namespace Bharat_Gun_House { public partial class FrmOrder : Form { public FrmOrder() { InitializeComponent(). . KeyEventArgs e) { if (e.Drawing.label1. KeyEventArgs e) { if (e.KeyCode == Keys.txtadd.Generic. } private void txtcity_KeyDown(object sender.btnEdit.Text. System.com.Collections.Enter) this.KeyCode == Keys.Enter) this.Enter) this. KeyEventArgs e) { if (e.ComponentModel. sno++.Enter) this.KeyCode == Keys.Close(). private void FrmOrder_Load(object sender.Focus(). } private void txtsup_KeyDown(object sender. sno = Convert.ExecuteScalar()). } private void txtpincode_KeyDown(object sender. System. KeyEventArgs e) { if (e.label1. EventArgs e) { this. System.Focus().KeyCode == Keys. this.Forms.} private void txtstate_KeyDown(object sender.ToInt32(db.Left = this.Left .Left = this.txtcity. } private void txtadd_KeyDown(object sender.label1.10. EventArgs e) { if (this.Focus().

txtvalid. } catch { } } private void btnedit_Click(object sender.txtlicence.'"+this.Text = "".txtvalid. this.txtcname.txtsno.Text + "'".Date.Text = "".Value = 0.Text = "". LinkLabelLinkClickedEventArgs e) { this. } catch { } } private void btndelete_Click(object sender.ExecuteNonQuery(). EventArgs e) { this.ToShortDateString() + "'.datetime.valid='" + this. } catch { } } private void btncancel_Click(object sender.numqty.com. FrmorderEdit oe = new FrmorderEdit().ToShortDateString() + "'.Value + " where sno='" + this.'" + this.KeyCode == Keys. this.Text = "". this.txtcname. EventArgs e) { try { db. this.txtlicence. MessageBox.orderdate='" + this.Text = "". this.txtcname.txtvalid.Value.Text + "'.txtsno. db.Date.txtsno.Text + "'".txtcname. this.txtlicence.com.Text = "".numqty. } private void linkLabel1_LinkClicked(object sender.'" + this.Enter) this.Value + ".com.Text = "".ExecuteNonQuery(). KeyEventArgs e) { .CommandText = "delete from orders where sno='" + this.Text + "'.com.CommandText = "insert into orders values('" + this.qty=" + this.Text + "'.Text = "".txtsno.com.txtcname. KeyEventArgs e) { if (e. oe.com.CommandText = "update orders set name='" + this.Text = "".txtvalid. db.Close().Text + "'.Text = "".txtsno.txtlicence.Text+"')".Close().datetime.} this.Value. this.Text = "".Text + "'.ExecuteNonQuery().numqty.ToString(). } private void txtcname_KeyDown(object sender.Text + "'. this.txtsno.txtsno.licenceno='" + this. this.txtcname.Show().txttypeoforder.'" + this. db. } private void txtsno_KeyDown(object sender.Text = "". this. } catch { sno = 1.Focus(). this." + this.txtlicence.Text + "'.Show("Record Inserted"). EventArgs e) { try { db.Text = "". this.Text = sno.'" + this. EventArgs e) { try { db. } private void btnsave_Click(object sender. this. this.txtvalid.txttypeoforder.

} private void txtlicence_KeyDown(object sender.Left = this.Right > 0 && this. this.btnsave.Focus().Text. private void FrmBill_Load(object sender.KeyCode == Keys.Right.Right <=9) this.txttypeoforder. namespace Bharat_Gun_House { public partial class FrmBill : Form { public FrmBill() { InitializeComponent(). System.CommandText = "select distinct armsno as aa from productinsert". EventArgs e) { if (this.ExecuteReader().Enter) this.10. EventArgs e) { this.label1.cmbvariety.txtlicence. System.Enter) this. } private void txttypeoforder_KeyDown(object sender.KeyCode == Keys.KeyCode == Keys.com. System.Enter) this.com.Focus().KeyCode == Keys.Read()) { if(db. while(db. } private void datetime_CloseUp(object sender.Generic. KeyEventArgs e) { if (e. KeyEventArgs e) { if (e. } private void timer1_Tick(object sender.if (e.label1. EventArgs e) { this.Enter) this.label1.txtvalid.KeyCode == Keys.datetime.Enter) this. } private void txtvalid_KeyDown(object sender.Focus(). System.Focus().Data.ComponentModel.cid=0.dr = db.Focus(). } } } using using using using using using using System.ToString()!="") .Left = this. System.Enabled = true.Left .label1.btnclear.Windows.label1. KeyEventArgs e) { if (e. KeyEventArgs e) { if (e.dr.Enabled = true.numqty.Collections.Focus(). db. } int BillID = 0. db.dr["aa"]. this. System.Drawing. } private void numqty_KeyDown(object sender.Forms.

com. . } catch { stateid = 1. db. stateid = Convert. qty1 = Convert.CommandText = "select max(CID) from customers ".Text + "'and armsno='" + this.this. } db.dr = db.cmbbore.ToInt32(this.Value). db.Add(db.Items.cmbclassification. while(db.numberqty.ToInt32(db.CommandText = "select purchaseprice from productinsert where armsno='" + this.com.com.com.Text + "'and classification='" + this.Read()) { if(db.Text + "' and bore=" + this.Close().ExecuteScalar()).Text+"'".Add(db. } catch { cid = 1.cmbarmsno.dr["cl"].Items.Items.cmbtype.ToInt32(db.cmbarmsno.com.ToInt32(this. cid = Convert.cmbclassification.dr["st"].ToInt32(db.cmbvariety.ExecuteScalar()). markt = Convert.ExecuteReader(). while (db.com.CommandText = "select max(Billid) from bill".com.ToInt32(db.com. int quantity = Convert.com.ExecuteScalar()).Text+"'". } try{ db.dr.dr["st"]).dr.CommandText = "select distinct statename as st from states".dr["cl"].Close().cmbarmsno. BillID = Convert.cmbclassification. EventArgs e) { try { } catch { BillID = 1.markt. cid++.Value). cityid = Convert.com.dr.qty2.CommandText = "select max(stateid) from states".CommandText = "select distinct Classification as cl from productinsert".ToInt32(db.ExecuteScalar()).Text + "' and company='" + this. } //catch { } if (qty1 > 0 && qty2<=qty1) { try { db.cmbcompany.ToString()!="") this.ToString()). }db.cityid.dr. db.com. private void btnsave_Click(object sender.dr = db.stateid.cmbcompany. }db.com.Text + " and type='" + this.Text + "'and lodertype='"+this.Text + "and type='" + cmbtype.cmbvariety. try { db.cmbproname.Text + "' and company='" + this.dr["aa"]).numberqty.Read()) { if (db.cmbstate.Text + "'and gunname='" + this.CommandText = "select sum(qty) from productinsert where subitemsid=" + subid + " and classification='" + this. BillID++.Close().ExecuteScalar()). } db. } catch { cityid = 1.cmbbore. db.Text + "'and lodertype='"+this. db.com.ExecuteScalar()).ToString() != "") this.Text + "'and bore=" + this.com.ExecuteReader().ToInt32(db.dr.Add(db.com.CommandText = "select max(cityid) from cities".com. } // try { qty2 = Convert. } int qty1. } try { db.

txtreceiveamount.com. db. db.Text.'"+this.txtlicence.'" + this. this.txtdue.ExecuteNonQuery().Text + ".Text+".Text = "".ToShortDateString() +"'.Text = "".'" + this. db.txtreceiveamount.Text.Value.'" + this. db.dr = db.'"+this.cmbclassification.Text + "')".Text+"'.cmbstate.cmbtype.datetime.Close().'" + this.Text+"'".db.Text+"'.cmbclassification.'"+this.cmbcity.Text+"'.Text+"'and lodertype='"+this.Text = "". this.dr.'" + this.Text+"'.com.cmbcity.'" + this.CommandText = "insert into cities values(" + cityid + ".numberqty." + this.Text = "".txtprie.Text+"'. this. this. this. this." + this. if (db. } db.com.txtcname.Text+". stateid++.com.'" + this. db. db. this.txtlicence.ExecuteNonQuery(). cityid++.com.txtvalid.CommandText = "insert into Bill values(" + BillID + ".cmbbore.txtcname.'"+this.ExecuteNonQuery().CommandText = "delete from orders where name='"+this.txtvalid.Text = "".cmbarmsno.cmbcity. this."+this.Close().com.ExecuteNonQuery().cmbstate.Text+"."+this.cmbvariety.txtvalid.'" + this.cmbproname.Te xt+"'.ExecuteReader().txtcname.Text + "'.txtlicence."+this.txtcname.txtdue.Read()) { db.ExecuteNonQuery().Date.Text+"'.Text + "')"."). this.CommandText = "update productinsert set qty=qty-" + quantity + " where subitemsid=" + subid + " and classification='" + this. db.com.com.cmbstate. db. } db.dr = db. db.'"+this.'" + this.txtlicence.txtaddress. MessageBox.txtlicence.com.cmbstate. db.ExecuteNonQuery(). if (db..Text = "".Text + "'.Close().datetime. this.numberqty. db.com. db.Text+"'.'"+this.Date.com.Text + "."+this.cmbarmsno.Text + "')".com.cmbcity.CommandText = "select cityname from cities where cityname='"+this.Text+".com.cmbbore.dr.ExecuteReader().Value+". db." + this.'"+this.Value.txtcontactno.CommandText = "insert into datasale values('"+this.dr.'"+this.Text + " and type='" + this.Text+"'".CommandText = "insert into states values(" + stateid + ". db.Text + "' and company='" + this.txtpayable.CommandText = "select statename from states where statename='"+this.CommandText = "insert into customers values(" + cid + ".txtpayable. } else { db."+ this. this.Show("Record Inserted.ToShortDateString() + "'.cmbva riety.com.txtcname. } else { db. .Text = "".'"+this.dr.Text + "'and armsno='"+this." + this.Text + "'.'"+this.licenceno = this.Text + ".'"+this." + itemid + ".Text+"'".txtdue.'" + this."+this."+markt+")".dr.Text = "".txtaddress.Text = "". this. db.Text = "".cmbstate.Text+"'".Text+"'." + cid + ".cmbarmsno.txtpayable.Read()) { db.cmbcity.Text + "'.com.txtcontactno.Text+"'.Text + "'.Text+"'.Text + "' and bore=" + this. db.Text+"' and licenceno='"+this." + subid + ".com.Text = ""." + stateid + ".com.Text = "".Text+"'.Text = "".cmbbore.Text + "'.dr. db. this.Value + ")".ExecuteNonQuery().customername = this.com.cmbcompany.txtaddress.'"+t his.txtreceiveamount.cmbcompany.cmbclassification.Text+".Close().cmbtype.

Text = "".RemoveAt(i).cmbproname.Text = "". EventArgs e) { this.Close().Items.Count >= 2) { for (int i = 0. db.cmbbore. rd.cmbbore.Value = 1.dr = db.Text+"'". this. this.CommandText = "select distinct bore as bb from productinsert where gunname='"+this.Text = "".CommandText = "select Subitemsid from subitem where itemname='"+this. while (db.Show(). } db. j++) { if (this.Visible = true.Items.Show("Limit Exceed"+" Stock Quantity is="+qty1.com. private void cmbproname_SelectedIndexChanged(object sender.cmbbore.Items.Items.Items.datetime. if (this.numberqty.Count.Enabled = true. EventArgs e) { this. this.Add(db.cmbbore.ToString()) { this. this.dr["bb"]). this.Text = "".Enabled = true.Items[i]. this. i++) { for (int j = i + 1.txtdue. db.dr.cmbtype.this.Text = "".Visible = true.Items[j]. } } private void linkLabel1_LinkClicked(object sender. this. this. this. this.Text = "". this.Text+"'".cmbproname. db.cmbtype.cmbcompany.Items.cmbbore.Clear(). LinkLabelLinkClickedEventArgs e) { FrmConsignmentedit bill = new FrmConsignmentedit(). } } } } } private void cmbclassification_SelectedIndexChanged(object sender.cmbclassification.ToString() == this. CRVCustomerReport rd = new CRVCustomerReport().com.cmbbore. EventArgs e) { this. } catch { } } else { MessageBox.Text = "". bill.itemid. } int subid. subid = Convert.Close().Read()) { this.dr.ToString()+"Or Dosen't Exist"). . this. this.ExecuteReader(). i < cmbbore.Text+"' and classification='"+this.Text = "".btnsave.com.Text="".cmbbore. this. } private void btncancel_Click(object sender.Text = "".cmbcompany.Text = "".cmbproname.Clear(). this.btncancel.com.Hide(). this.cmbproname.Show().ExecuteScalar()).Count.ToInt32(db.cmbcompany.cmbproname.lbldue. this.Items. j < cmbbore.cmbbore.cmbtype.Close().

db.com.CommandText = "select itemid from items where itemname='" + this.cmbclassification.Text + "'"; itemid = Convert.ToInt32(db.com.ExecuteScalar()); db.com.CommandText = "select distinct gunname as gn from productinsert where classification='"+this.cmbclassification.Text+"'"; db.dr = db.com.ExecuteReader(); while (db.dr.Read()) { if (db.dr["gn"].ToString() != "") this.cmbproname.Items.Add(db.dr["gn"].ToString()); } db.dr.Close(); } private void txtcname_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) this.txtaddress.Focus(); } private void txtaddress_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) this.txtlicence.Focus(); } private void txtlicence_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) this.txtvalid.Focus(); } private void txtvalid_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) this.txtcontactno.Focus(); } private void txtcontactno_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) this.cmbstate.Focus(); } private void txtstate_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) this.cmbcity.Focus(); } private void txtcity_KeyDown(object sender, KeyEventArgs e) { }

private void txtarmsno_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) { this.cmbclassification.Focus(); } } private void cmbbore_SelectedIndexChanged(object sender, EventArgs e) { this.cmbtype.Items.Clear(); this.cmbcompany.Items.Clear(); db.com.CommandText = "select type,company from productinsert where gunname='" + this.cmbproname.Text + "'and classification='"+this.cmbclassification.Text+"' and bore='"+this.cmbbore.Text+"'"; db.dr = db.com.ExecuteReader(); while (db.dr.Read()) { if (db.dr["type"].ToString() != "") this.cmbtype.Items.Add(db.dr["type"].ToString());

if (db.dr["company"].ToString() != "") this.cmbcompany.Items.Add(db.dr["company"].ToString()); } db.dr.Close(); if (this.cmbtype.Items.Count >= 2) { for (int i = 0; i < cmbtype.Items.Count; i++) { for (int j = i + 1; j < cmbtype.Items.Count; j++) { if (this.cmbtype.Items[i].ToString() == this.cmbtype.Items[j].ToString()) { this.cmbtype.Items.RemoveAt(i); } } } } if (this.cmbcompany.Items.Count >= 2) { for (int i = 0; i < cmbcompany.Items.Count; i++) { for (int j = i + 1; j < cmbcompany.Items.Count; j++) { if (this.cmbcompany.Items[i].ToString() == this.cmbcompany.Items[j].ToString()) { this.cmbcompany.Items.RemoveAt(i); } } } } } int rs,remainrs,duers; private void txtpayable_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) this.txtreceiveamount.Focus(); } private void txtreceiveamount_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) this.txtdue.Focus(); } private void txtdue_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) this.btnsave.Focus(); } private void radbillinvoice_CheckedChanged(object sender, EventArgs e) { this.lbldue.Visible = true; this.txtdue.Visible = true; //this.numberqty.Location = new Point(362, 266); //this.label10.Location = new Point(281, 270); Enable(); } private void radcashmemo_CheckedChanged(object sender, EventArgs e) { this.txtdue.Text = "0"; this.lbldue.Visible = false; this.txtdue.Visible = false; //this.numberqty.Location = new Point(362, 241); //this.label10.Location = new Point(282, 246); } void Enable() { this.txtaddress.Enabled = true; this.cmbarmsno.Enabled = true; this.cmbcity.Enabled = true; this.txtcname.Enabled = true; this.txtcontactno.Enabled = true; this.txtdue.Enabled = true; this.txtlicence.Enabled = true;

this.txtpayable.Enabled = true; this.txtreceiveamount.Enabled = true; this.cmbstate.Enabled = true; this.txtvalid.Enabled = true; this.cmbbore.Enabled = true; this.cmbclassification.Enabled = true; this.cmbcompany.Enabled = true; this.cmbproname.Enabled = true; this.cmbtype.Enabled = true; this.numberqty.Enabled = true; this.datetime.Enabled = true; this.lbldue.Visible = true; this.btncancel.Enabled = true; this.btnsave.Enabled = true; this.txtdue.Visible = true; this.txtprie.Enabled = true; } private void txtdue_Enter(object sender, EventArgs e) { try { rs = Convert.ToInt32(this.txtpayable.Text); remainrs = Convert.ToInt32(this.txtreceiveamount.Text); duers = rs - remainrs; this.txtdue.Text = duers.ToString(); } catch { } } private void numberqty_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) this.txtpayable.Focus(); } private void btnclear_Click(object sender, EventArgs e) { this.txtaddress.Text = ""; this.cmbarmsno.Text = ""; this.txtcname.Text = ""; this.txtcontactno.Text = ""; this.txtdue.Text = ""; this.txtlicence.Text = ""; this.txtpayable.Text = ""; this.txtreceiveamount.Text = ""; this.txtvalid.Text = ""; this.cmbbore.Text = ""; this.cmbcity.Text = ""; this.cmbclassification.Text = ""; this.cmbcompany.Text = ""; this.cmbproname.Text = ""; this.cmbstate.Text = ""; this.cmbtype.Text = ""; this.cmbvariety.Text = ""; this.txtprie.Text = ""; this.numberqty.Value = 1; } private void cmbstate_DropDownClosed(object sender, EventArgs e) { this.cmbcity.Focus(); } private void cmbstate_KeyDown(object sender, KeyEventArgs e) { if(e.KeyCode== Keys.Enter) this.cmbcity.Focus(); } private void cmbstate_SelectedIndexChanged(object sender, EventArgs e) { db.com.CommandText = "select stateid from states where statename='"+this.cmbstate.Text+"'"; int ssid = Convert.ToInt32(db.com.ExecuteScalar()); this.cmbcity.Items.Clear();

db.com.CommandText = "select cityname as ci from cities where stateid="+ssid+""; db.dr = db.com.ExecuteReader(); while (db.dr.Read()) { if (db.dr["ci"].ToString() != "") this.cmbcity.Items.Add(db.dr["ci"]); } db.dr.Close(); } private void cmbcity_KeyDown(object sender, KeyEventArgs e) { } private void cmbarmsno_DropDownClosed(object sender, EventArgs e) { this.cmbtype.Focus(); } private void cmbarmsno_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) this.cmbclassification.Focus(); } private void cmbclassification_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) this.cmbproname.Focus(); } private void cmbclassification_DropDownClosed(object sender, EventArgs e) { this.cmbproname.Focus(); } private void cmbproname_DropDownClosed(object sender, EventArgs e) { this.cmbbore.Focus(); } private void cmbproname_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) this.cmbbore.Focus(); } private void cmbbore_DropDownClosed(object sender, EventArgs e) { this.cmbarmsno.Focus(); } private void cmbtype_DropDownClosed(object sender, EventArgs e) { this.cmbcompany.Focus(); } private void cmbtype_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) this.cmbcompany.Focus(); } private void cmbcompany_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) this.datetime.Focus(); } private void cmbcompany_DropDownClosed(object sender, EventArgs e) { this.cmbvariety.Focus(); } private void datetime_CloseUp(object sender, EventArgs e) { this.txtprie.Focus();

EventArgs e) { db. } private void numberqty_Enter(object sender. . } private void cmbcity_DropDownClosed(object sender. int cc = aa * bb. } private void label7_Click(object sender. EventArgs e) { } private void cmbvariety_DropDownClosed(object sender.cmbtype.cmbvariety.} private void cmbbore_KeyDown(object sender.dr.com.dr.Text = cc.txtprie.Clear().Focus().Read()) { this. } db.Enter) this.cmbclassification.txtpayable.Focus(). EventArgs e) { } private void cmbcompany_SelectedIndexChanged(object sender.numberqty.ToInt32(this.cmbvariety. this.CommandText = "select * from productinsert where type='"+this. using System. this.Close().ToString().Focus().Items.Generic. } private void txtprie_KeyDown(object sender. KeyEventArgs e) { if (e.Focus().Value).Collections. EventArgs e) { this. EventArgs e) { int aa = Convert. int bb = Convert. } private void cmbtype_SelectedIndexChanged(object sender. EventArgs e) { } private void txtpayable_Enter(object sender. db. while (db.com.Text).Add(db.KeyCode == Keys.dr = db.datetime. } } } using System.ToInt32(this.cmbtype.Enter) this.ExecuteReader().Items. EventArgs e) { this.numberqty.KeyCode == Keys. KeyEventArgs e) { if (e.Text+"'".dr["Lodertype"]).

ToInt32(this. rw.repairt.using using using using using System.com. LinkLabelLinkClickedEventArgs e) { FrmRepairEdit edt = new FrmRepairEdit().Text+"'.Forms.Text. this.CommandText = "insert into repair values("+maxsno+".Text = "".Show().Text+"'.Date. rw. bharatDataSet.received = Convert.txtadd.txtdesc.Name = this.txtreceived.ToInt32(this.repairtRow rw = bharatDataSet.txtname.Add(rw). this.txtdesc.description = this.Focus(). this. System.txtadd. this.Text+"'.com.Text). System.ToInt32(this.NewrepairtRow(). rw.Text = "".Text = "".'"+this.ToInt32(db. private void FrmRepair_Load(object sender.txtdue.datetime. this. this. rw.rdate = this. EventArgs e) { this.ToShortDateString()+"')".Text+".bharatDataSet.Rows.'"+this.ComponentModel.Text).Value.Text = "".Text).Close(). } int maxsno. this.txtdue. LinkLabelLinkClickedEventArgs e) { FrmRepairEdit edt = new FrmRepairEdit().txtpaya.txtrepair.Show("Record Inserted").'"+this. } catch { } } private void btncancel_Click(object sender. } } private void linkLabel2_LinkClicked(object sender.ExecuteScalar()).txtdue.txtrepair.Text = "".Close().payable = Convert.Data. maxsno++.com. System. rw."+this.Text = "".ToShortDateString().txtrepair.due = Convert.Text.Show(). edt. maxsno = Convert. } catch { maxsno++.txtpaya.Text+"'. System. rw.repairt.txtname.ExecuteNonQuery().repairtype = this.txtadd.T ext+".txtdesc.Text.txtreceived. edt. } private void btnok_Click(object sender.Windows. } private void txtarmsno_KeyDown(object sender. MessageBox.com.Value.CommandText = "select max(sno) from repair".Drawing.txtpaya. namespace Bharat_Gun_House { public partial class FrmRepair : Form { public FrmRepair() { InitializeComponent().Close(). try { db. this. } private void linkLabel1_LinkClicked(object sender. KeyEventArgs e) .'"+this."+this.Text.Date.Text. db. rw.txtname.txtreceived. EventArgs e) { try { db.address = this.'"+this. this.datetime.Text+"'.' "+this.Text = "". rw.txtname. EventArgs e) { this. this.

Focus(). } private void txtname_KeyDown(object sender. } private void datetime_CloseUp(object sender. KeyEventArgs e) { if (e.Enter) this.rec. rec = Convert. due = paya . } private void txtdue_KeyDown(object sender. } private void txtdue_Enter(object sender. private void txtrepair_KeyDown(object sender. } private void txtdesc_KeyDown(object sender. EventArgs e) { this.Enter) this.Focus().KeyCode == Keys.Focus().KeyCode == Keys.btnok. due.Focus(). KeyEventArgs e) { if (e.Focus().txtrepair.Text = due.KeyCode == Keys. } e) private void linkLabel2_LinkClicked_1(object sender.txtdesc. KeyEventArgs e) { if (e.ToString().Enter) this.txtdesc.Focus().Enter) this. this. rec. if (e.Focus(). KeyEventArgs e) { if (e.KeyCode == Keys. } private void txtpaya_KeyDown(object sender.KeyCode == Keys.datetime. EventArgs e) { paya = Convert.txtdue.txtadd. KeyEventArgs e) { if (e. KeyEventArgs e) { if (e. EventArgs e) { this. } .Focus().KeyCode == Keys.txtreceived. du.txtdue. } private void txtparty_KeyDown(object sender. KeyEventArgs e) { if (e.txtname.Close(). } private void txtadd_KeyDown(object sender.{ } private void cmbclassifiation_DropDownClosed(object sender.Focus(). this.Show(). KeyEventArgs e) { if (e.ToInt32(this. } int paya.Enter) this.ToInt32(this.KeyCode == Keys.Text).Enter) this. } private void txtreceived_KeyDown(object sender.KeyCode == Keys.Text).KeyCode == Keys.txtpaya.txtpaya.datetime. LinkLabelLinkClickedEventArgs { FrmrepairDues1 du = new FrmrepairDues1().Focus().txtreceived.Enter) this.Focus().Enter) this.Enter) this.

EventArgs e) { try { db. re. } catch { } } private void btnDelete_Click(object sender.txtpaya.due="+this.Text.Text = "". re. } private void btnEdit_Click(object sender.CommandText = "update repair set party='" + this. or remove it. this.com. this. db.Collections.com.txtdes c. this.ExecuteNonQuery(). this.txtname. db.txtname. EventArgs e) { .Data. FrmRepairEdit re = new FrmRepairEdit().Text = "".bharatDataSet.CommandText = "delete from repair where sno=" + sno + "".Question).Text+". this. System.Text+".MessageBoxButtons.Text+"'.Text + "'.txtdate.txtreceived.Drawing.Text = "".txtdesc.ExecuteNonQuery().txtadd.Generic.Close(). this.payable="+this.Show(). EventArgs e) { // TODO: This line of code loads data into the 'bharatDataSet.YesNo. System.txtrepair. namespace Bharat_Gun_House { public partial class FrmRepairEdit : Form { public FrmRepairEdit() { InitializeComponent().com.Show(). this.repairTableAdapter.com.description='"+this.address='"+this.txtdue.ComponentModel.txtreceiv ed.Text = "".Windows. this. this. } private void FrmRepairEdit_Load(object sender.Text+"'.repair' table. this.txtdate. System.txtadd.repair).Show("Are u sure to Delete ?".Text+"'where sno="+sno+"". EventArgs e) { try { DialogResult dr = MessageBox. MessageBox.Text+". System.Yes) { db.Close()."Delete".txtpaya.txtrepair. System.Text = "".} } using using using using using using using System. } } catch { } } private void btncancel_Click(object sender.Forms.repairtype='"+this.received="+this. if (dr == DialogResult. FrmRepairEdit re = new FrmRepairEdit().MessageBoxIcon.txtdue.Show("Record Updated").Fill(this.Text = "". System. You can move.Text+"'.Text = "". this.Text = "".rdate='"+this. as needed.

dr["repairtype"].} } this. EventArgs e) { int max. max = Convert.Text+". DataGridViewCellEventArgs e) { sno = Convert.Text + "'.com.Text = db.CommandText = "select * from repair where sno="+sno+"".Text + "'. or remove it. db.Close().txtdesc. private void dataGridView1_CellClick(object sender.bharatDataSet.Forms. System.Value). this.Text+".ExecuteScalar()).Data.Fill(this.Windows.dr["description"].txtadd.Value. db.ToString(). this.'" + this.ExecuteReader().txtname.txtdesc.ComponentModel. System.dr["rdate"]. System.dr["received"]. } try { db.txtreceived. try { db. this.ToInt32(this.'" + this.Text = db.'" + this.com.Text+".CommandText = "select max(sno) from partyback". } int sno.txtpaya. db. System.txtpaya.Text = db.com.txtrepair.txtdue.ToString(). this.dataGridView1.Date.repair' table.dr["due"].com.ToString().'"+this. } using using using using using using using System. . this.dr["address"].Drawing. System. } db. You can move.repairTableAdapter. } private void FrmBackToParty_Load(object sender.dr.Text + "'. this.Read()) { this.RowIndex].ToString(). this.dr["payable"].Text. as needed.Rows[e.dr = db.Text = db. } catch { max = 1.dr["party"]. namespace Bharat_Gun_House { public partial class FrmBackToParty : Form { public FrmBackToParty() { InitializeComponent().Cells[0].Close().CommandText = "insert into partyback values("+max+".ExecuteNonQuery(). System.Text = db.dr.Generic.com.ToString().ToString().com.txtdue.txtadd.ToString().Collections.txtrepair.txtdate.Text + "'.dateTimePi cker1."+this. if (db.ToString().ToShortDateString()+"')".txtname."+this."+this. EventArgs e) { // TODO: This line of code loads data into the 'bharatDataSet. this. } private void btnok_Click(object sender.Text = db.txtreceived.ToInt32(db.Text = db.repair). max++.Text = db.'" + this.

txtpaya.KeyCode == Keys.Enter) . this.com.com.Text = db.Focus().Show().CommandText = "delete from repair where party='"+this. MessageBox.dr.ToString().Close().Rows[e. par. } db.txtadd.dr["payable"].txtdesc.Enter) this. FrmBackToParty pa = new FrmBackToParty(). this..RowIndex].txtname.txtadd. this.Read()) { this. pa.Text = "". } } catch { } private void btncancel_Click(object sender. this.Text = "".ToString(). private void dataGridView1_CellClick(object sender.ToInt32(this. KeyEventArgs e) { if (e.Text = db.ToString().txtrepair.CommandText = "select * from repair where sno="+nn+"".dr["party"].Text = db.Show(). db.txtreceived.KeyCode == Keys. this.Focus().Text = db.Show("Return Successfully.Close().txtdue.Value).txtrepair.Text = "".dataGridView1.txtdue.Close(). this.Text+"'".Text = "".Cells[0].KeyCode == Keys.dr["description"]. DataGridViewCellEventArgs e) { nn = Convert.Enter) this. this.txtdesc. this.txtname.KeyCode == Keys.dr["received"]. db.ToString(). } private void txtname_KeyDown(object sender.txtreceived.Text = db. db.Text = "".ExecuteReader(). EventArgs e) { } int nn. LinkLabelLinkClickedEventArgs e) { Frmpartybackedit par = new Frmpartybackedit(). KeyEventArgs e) { if (e.Text = "".com. } private void pictureBox1_Click(object sender.txtrepair.Close(). if (db..txtpaya. this. this.db.ToString(). KeyEventArgs e) { if (e.dr["repairtype"].dr["due"]. } private void txtadd_KeyDown(object sender.ToString().dr = db.txtdesc.txtname..com. } private void txtrepair_KeyDown(object sender.txtadd. KeyEventArgs e) { if (e.Enter) this. this."). } private void txtdesc_KeyDown(object sender.dr.ToString().dr["address"]. EventArgs e) { this.Text+"' and address='"+this.Text = db. } private void linkLabel1_LinkClicked(object sender. this. this. this.Focus().ExecuteNonQuery(). this.Text = "".txtadd.Text = db..

} private void Frmpartybackedit_Load(object sender. System.Focus(). System. System.repairtype='"+this.ExecuteNonQuery().btnok. } } } using using using using using using using System.Collections. MessageBox. this.txtdate1.partyback).payable="+this. System.txtadd. db. this. private void txtpaya_KeyDown(object sender.due="+this.Enter) this.Data.Text = "".Text = "".com.Text+"'.Generic. or remove it.Text = "".Focus().txtpaya.} this.Text.KeyCode == Keys. this.txtname.Text = "".Text+". this. txtreceived.Windows.. } private void txtreceived_KeyDown(object sender. } private void btnEdit_Click(object sender.txtpaya.Forms.txtreceived.dateTimePicker1.ComponentModel.txtname.Enter) this. System.Text+"'. this.txtdesc.Focus().KeyCode == Keys. KeyEventArgs e) { if (e. KeyEventArgs e) { if (e. EventArgs e) { this.txtdesc. as needed. System.Text+"'.txtdue. EventArgs e) { db. } private void txtdue_KeyDown(object sender. } private void dateTimePicker1_CloseUp(object sender. this.txtdate1.Show("Updated.Text = "". KeyEventArgs e) { if (e.Text = "".").description='"+this.received="+this.T ext+"'.com.Text+"' where sno="+sn+"".Text+".Focus().txtpaya.txtrepair. namespace Bharat_Gun_House { public partial class Frmpartybackedit : Form { public Frmpartybackedit() { InitializeComponent(). You can move.Drawing.CommandText = "update partyback set party='"+this.address='"+this.Fill(this. .Enter) this.rdate='"+this. this.Focus().txtdue.Text+".txtdue. EventArgs e) { // TODO: This line of code loads data into the 'bharatDataSet.KeyCode == Keys.bharatDataSet.partyback' table.partybackTableAdapter.txtadd.

this.txtreceived.Text = ""; this.txtrepair.Text = ""; Frmpartybackedit ed = new Frmpartybackedit(); ed.Show(); } private void btndelete_Click(object sender, EventArgs e) { try { DialogResult dr=MessageBox.Show("Are U sure ?","Delete",MessageBoxButtons.YesNo,MessageBoxIcon.Question); if(dr==DialogResult.Yes) { db.com.CommandText="delete from partyback where sno="+sn+""; db.com.ExecuteNonQuery(); this.txtadd.Text=""; this.txtdate1.Text=""; this.txtdesc.Text=""; this.txtdue.Text=""; this.txtname.Text=""; this.txtpaya.Text=""; this.txtreceived.Text=""; this.txtrepair.Text=""; this.Close(); Frmpartybackedit ed = new Frmpartybackedit(); ed.Show(); } } catch { } } private void btnref_Click(object sender, EventArgs e) { } private void btncancel_Click(object sender, EventArgs e) { this.Close(); } private void groupBox1_Enter(object sender, EventArgs e) { } private void txtarmsno_KeyDown(object sender, KeyEventArgs e) { } private void txtparty_KeyDown(object sender, KeyEventArgs e) { } private void txtdate_KeyDown(object sender, KeyEventArgs e) { } int sn; private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e) { sn = Convert.ToInt32(this.dataGridView1.Rows[e.RowIndex].Cells[0].Value); db.com.CommandText = "select * from partyback where sno="+sn+""; db.dr = db.com.ExecuteReader(); if (db.dr.Read()) { this.txtadd.Text = db.dr["address"].ToString(); this.txtname.Text = db.dr["party"].ToString(); this.txtdesc.Text = db.dr["description"].ToString(); this.txtrepair.Text = db.dr["repairtype"].ToString(); this.txtpaya.Text = db.dr["payable"].ToString(); this.txtreceived.Text = db.dr["received"].ToString(); this.txtdue.Text = db.dr["due"].ToString(); } db.dr.Close();

} private void txtname_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) this.txtadd.Focus(); } private void txtadd_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) this.txtdesc.Focus(); } private void txtdesc_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) this.txtrepair.Focus(); } private void txtrepair_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) this.txtpaya.Focus(); } private void txtpaya_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) this.txtreceived.Focus(); } private void txtreceived_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) this.txtdue.Focus(); } private void txtdue_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) this.txtdate1.Focus(); } private void txtdate1_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) this.btnEdit.Focus(); }

} }

using using using using using using using

System; System.Collections.Generic; System.ComponentModel; System.Data; System.Drawing; System.Text; System.Windows.Forms;

namespace Bharat_Gun_House { public partial class StockReortFrm : Form { public StockReortFrm() { InitializeComponent(); }

private void StockReortFrm_Load(object sender, EventArgs e) { bharatDataSet bh = new bharatDataSet(); bharatDataSetTableAdapters.productinsertTableAdapter pi = new Bharat_Gun_House.bharatDataSetTableAdapters.productinsertTableAdapter(); pi.Fill(bh.productinsert); StocklReport ss = new StocklReport(); ss.SetDataSource(bh); crystalReportViewer1.ReportSource = ss; db.com.CommandText = "select distinct gunname as gg from productinsert "; db.dr = db.com.ExecuteReader(); while(db.dr.Read()) { this.cmbpnamee.Items.Add(db.dr["gg"].ToString()); } db.dr.Close(); db.com.CommandText = "select distinct bore as gg from productinsert "; db.dr = db.com.ExecuteReader(); while (db.dr.Read()) { this.cmbboree.Items.Add(db.dr["gg"].ToString()); } db.dr.Close(); db.com.CommandText = "select distinct company as gg from productinsert "; db.dr = db.com.ExecuteReader(); while (db.dr.Read()) { this.cmbcompanyy.Items.Add(db.dr["gg"].ToString()); } db.dr.Close(); "; db.com.CommandText = "select distinct classification as gg from productinsert db.dr = db.com.ExecuteReader(); while (db.dr.Read()) { this.cmbclassificationn.Items.Add(db.dr["gg"].ToString()); } db.dr.Close(); db.com.CommandText = "select distinct location as gg from productinsert "; db.dr = db.com.ExecuteReader(); while (db.dr.Read()) { this.cmblocation.Items.Add(db.dr["gg"].ToString()); } db.dr.Close(); db.com.CommandText = "select distinct gunname as gg from productinsert "; db.dr = db.com.ExecuteReader(); while (db.dr.Read()) { this.cmbpname.Items.Add(db.dr["gg"].ToString()); } db.dr.Close(); } private void cmbproname_SelectedValueChanged(object sender, EventArgs e) { string gg; gg = this.cmbproname.Text; bharatDataSet yy = new bharatDataSet(); bharatDataSetTableAdapters.productinsertTableAdapter pi = new Bharat_Gun_House.bharatDataSetTableAdapters.productinsertTableAdapter(); pi.Fill(yy.productinsert); StocklReport ss = new StocklReport(); ss.SetDataSource(yy); crystalReportViewer1.ReportSource = ss; crystalReportViewer1.SelectionFormula = "{productinsert.gunname}='" + gg + "'"; } private void cmbcompany_SelectedValueChanged(object sender, EventArgs e) { string gg;

gg = this.cmbcompany.Text; bharatDataSet yy = new bharatDataSet(); bharatDataSetTableAdapters.productinsertTableAdapter pi = new Bharat_Gun_House.bharatDataSetTableAdapters.productinsertTableAdapter(); pi.Fill(yy.productinsert); StocklReport ss = new StocklReport(); ss.SetDataSource(yy); crystalReportViewer1.ReportSource = ss; crystalReportViewer1.SelectionFormula = "{productinsert.company}='" + gg + "'"; } private void cmbclas_SelectedValueChanged(object sender, EventArgs e) { string gg; gg = this.cmbclas.Text; bharatDataSet yy = new bharatDataSet(); bharatDataSetTableAdapters.productinsertTableAdapter pi = new Bharat_Gun_House.bharatDataSetTableAdapters.productinsertTableAdapter(); pi.Fill(yy.productinsert); StocklReport ss = new StocklReport(); ss.SetDataSource(yy); crystalReportViewer1.ReportSource = ss; crystalReportViewer1.SelectionFormula = "{productinsert.classification}='" + gg + "'"; } private void dateTimePicker1_ValueChanged(object sender, EventArgs e) { string gg; gg = this.dateTimePicker1.Value.ToShortDateString(); bharatDataSet yy = new bharatDataSet(); bharatDataSetTableAdapters.productinsertTableAdapter pi = new Bharat_Gun_House.bharatDataSetTableAdapters.productinsertTableAdapter(); pi.Fill(yy.productinsert); StocklReport ss = new StocklReport(); ss.SetDataSource(yy); crystalReportViewer1.ReportSource = ss; crystalReportViewer1.SelectionFormula = "{productinsert.purchasedate}='" + gg + "'"; } private void button4_Click(object sender, EventArgs e) { if (this.chgunn.Checked && this.radarmss.Checked) { bharatDataSet yy = new bharatDataSet(); bharatDataSetTableAdapters.productinsertTableAdapter pi = new Bharat_Gun_House.bharatDataSetTableAdapters.productinsertTableAdapter(); pi.Fill(yy.productinsert); StocklReport ss = new StocklReport(); ss.SetDataSource(yy); crystalReportViewer1.ReportSource = ss; crystalReportViewer1.SelectionFormula = "{productinsert.gunname}='Gun' and {productinsert.classification}='Arms'"; } if (this.chgunn.Checked && this.radammunationn.Checked) { bharatDataSet yy = new bharatDataSet(); bharatDataSetTableAdapters.productinsertTableAdapter pi = new Bharat_Gun_House.bharatDataSetTableAdapters.productinsertTableAdapter(); pi.Fill(yy.productinsert); StocklReport ss = new StocklReport(); ss.SetDataSource(yy); crystalReportViewer1.ReportSource = ss; crystalReportViewer1.SelectionFormula = "{productinsert.gunname}='Gun' and {productinsert.classification}='Ammunation'"; } if (this.chgunn.Checked && this.radacessoriess.Checked) { bharatDataSet yy = new bharatDataSet(); bharatDataSetTableAdapters.productinsertTableAdapter pi = new Bharat_Gun_House.bharatDataSetTableAdapters.productinsertTableAdapter(); pi.Fill(yy.productinsert); StocklReport ss = new StocklReport(); ss.SetDataSource(yy);

chrevolverr.Fill(yy.productinsertTableAdapter().chpistolee.chrevolverr. ss.SetDataSource(yy). crystalReportViewer1.Checked && this. StocklReport ss = new StocklReport(). } if (this.productinsert).radammunationn. bharatDataSetTableAdapters.bharatDataSetTableAdapters.Checked && this. } if (this. StocklReport ss = new StocklReport().ReportSource = ss.gunname}='Pistole' and {productinsert.SelectionFormula = "{productinsert. ss.gunname}='Pistole' and {productinsert.Fill(yy.chgunn.productinsert).Checked) { bharatDataSet yy = new bharatDataSet().radarmss.classification}='Acessories'".radboree.bore}>0".classification}='Arms'". ss. } if (this.productinsertTableAdapter pi = new Bharat_Gun_House. crystalReportViewer1.ReportSource = ss. StocklReport ss = new StocklReport().classification}='Ammunation'".Checked) { bharatDataSet yy = new bharatDataSet(). bharatDataSetTableAdapters. crystalReportViewer1.chpistolee.Checked) { bharatDataSet yy = new bharatDataSet().SelectionFormula = "{productinsert. crystalReportViewer1.chpistolee.productinsert).Checked && this. StocklReport ss = new StocklReport().gunname}='Pistole' and {productinsert.productinsert).Checked && this. bharatDataSetTableAdapters.SelectionFormula = "{productinsert.productinsertTableAdapter(). pi. } if (this.radarmss.ReportSource = ss. crystalReportViewer1.gunname}='Pistole' and {productinsert.SelectionFormula = "{productinsert.bore}>0".SelectionFormula = "{productinsert. ss.ReportSource = ss.productinsertTableAdapter pi = new Bharat_Gun_House. crystalReportViewer1.classification}='Acessories'".bharatDataSetTableAdapters.productinsertTableAdapter pi = new Bharat_Gun_House. crystalReportViewer1.gunname}='Gun' and {productinsert.Fill(yy.chpistolee.Fill(yy.Checked) { bharatDataSet yy = new bharatDataSet().productinsertTableAdapter(). crystalReportViewer1.productinsertTableAdapter pi = new Bharat_Gun_House.SetDataSource(yy). bharatDataSetTableAdapters. pi. crystalReportViewer1. crystalReportViewer1.Fill(yy. crystalReportViewer1.productinsert).bharatDataSetTableAdapters.radammunationn.productinsertTableAdapter(). pi.Checked && this.gunname}='Revolver' and {productinsert.SetDataSource(yy).Checked && this. pi. StocklReport ss = new StocklReport().Checked) { bharatDataSet yy = new bharatDataSet().ReportSource = ss.radboree.ReportSource = ss. bharatDataSetTableAdapters. ss. } if (this.bharatDataSetTableAdapters. } if (this. } if (this. pi.crystalReportViewer1.SetDataSource(yy). ss.productinsertTableAdapter pi = new Bharat_Gun_House.productinsertTableAdapter().Checked) { bharatDataSet yy = new bharatDataSet().productinsertTableAdapter pi = new Bharat_Gun_House.Fill(yy. crystalReportViewer1.radacessoriess. pi.bharatDataSetTableAdapters.bharatDataSetTableAdapters.Checked) .SetDataSource(yy).ReportSource = ss.SelectionFormula = "{productinsert.productinsertTableAdapter().gunname}='Gun' and {productinsert. StocklReport ss = new StocklReport().classification}='Arms'".Checked && this.SelectionFormula = "{productinsert. bharatDataSetTableAdapters.SetDataSource(yy). crystalReportViewer1.productinsert).

SetDataSource(yy).productinsertTableAdapter pi = new Bharat_Gun_House. crystalReportViewer1.bore}>0".gunname}='Rifle' and {productinsert.Checked) { bharatDataSet yy = new bharatDataSet().Checked) { bharatDataSet yy = new bharatDataSet().chriflee.productinsertTableAdapter pi = new Bharat_Gun_House. crystalReportViewer1.gunname}='Revolver' and {productinsert.chriflee.SetDataSource(yy).SelectionFormula = "{productinsert. } if (this.chrevolverr.ReportSource = ss.bharatDataSet yy = new bharatDataSet().productinsertTableAdapter pi = new Bharat_Gun_House.Fill(yy. pi.productinsertTableAdapter().gunname}='Rifle' and {productinsert.productinsert).productinsert).Fill(yy.productinsert).bharatDataSetTableAdapters. StocklReport ss = new StocklReport(). pi. crystalReportViewer1.Fill(yy. pi.SetDataSource(yy).productinsertTableAdapter().radarmss. } if (this.productinsertTableAdapter(). pi.SetDataSource(yy).classification}='Ammunation'". } if (this.SetDataSource(yy).gunname}='Rifle' and {productinsert. crystalReportViewer1.radammunationn.Checked && this. ss.Checked) { bharatDataSet yy = new bharatDataSet().productinsert).Fill(yy.SetDataSource(yy).productinsertTableAdapter pi = new Bharat_Gun_House. bharatDataSetTableAdapters. StocklReport ss = new StocklReport(). bharatDataSetTableAdapters.productinsert). StocklReport ss = new StocklReport(). { .Checked) { bharatDataSet yy = new bharatDataSet(). bharatDataSetTableAdapters.ReportSource = ss.Checked && this.SelectionFormula = "{productinsert. StocklReport ss = new StocklReport().ReportSource = ss.SelectionFormula = "{productinsert.bharatDataSetTableAdapters.productinsertTableAdapter(). bharatDataSetTableAdapters.bharatDataSetTableAdapters.ReportSource = ss.Checked && this.productinsert). crystalReportViewer1. } if (this.Checked && this. crystalReportViewer1.SelectionFormula = "{productinsert. pi.chrevolverr. ss. bharatDataSetTableAdapters. } if (this.Fill(yy.productinsertTableAdapter pi = new Bharat_Gun_House.Fill(yy.radboree. crystalReportViewer1.productinsertTableAdapter().productinsertTableAdapter(). bharatDataSetTableAdapters.bharatDataSetTableAdapters.chriflee.productinsert). pi.productinsertTableAdapter(). StocklReport ss = new StocklReport(). pi.classification}='Acessories'".radboree.productinsertTableAdapter pi = new Bharat_Gun_House.classification}='Acessories'". ss.Checked) { bharatDataSet yy = new bharatDataSet(). crystalReportViewer1.bharatDataSetTableAdapters.SelectionFormula = "{productinsert.bharatDataSetTableAdapters.Checked) { bharatDataSet yy = new bharatDataSet(). ss.ReportSource = ss.Checked && this.classification}='Arms'". crystalReportViewer1.gunname}='Revolver' and {productinsert.radacessoriess.Fill(yy. } if (this. bharatDataSetTableAdapters.Checked && this.SelectionFormula = "{productinsert. ss.chriflee.bharatDataSetTableAdapters. ss.productinsertTableAdapter pi = new Bharat_Gun_House. crystalReportViewer1.radacessoriess.gunname}='Revolver' and {productinsert.ReportSource = ss. StocklReport ss = new StocklReport(). crystalReportViewer1. crystalReportViewer1.classification}='Ammunation'".

cmblocation.bharatDataSetTableAdapters.Text = "".bharatDataSetTableAdapters. ss.cmbclassificationn.productinsertTableAdapter pi = new Bharat_Gun_House.cmbcompanyy. pi.Text = "". bharatDataSetTableAdapters.Text = "". } } private void cmbpnamee_SelectedIndexChanged(object sender.bharatDataSetTableAdapters.Text = "". this.Text = "".Text = "".SetDataSource(yy).SetDataSource(yy).cmbcompanyy. StocklReport ss = new StocklReport().classification}='" + gg + "'". pi. gg = this. } private void cmbclassificationn_SelectedIndexChanged(object sender. pi. StocklReport ss = new StocklReport(). bharatDataSet yy = new bharatDataSet().cmbboree. this.SelectionFormula = "{productinsert. ss. this. EventArgs e) { string gg.productinsertTableAdapter().Text. bharatDataSetTableAdapters. this.cmbboree.productinsertTableAdapter(). EventArgs e) { string gg.ReportSource = ss.Text = "".cmbproname. crystalReportViewer1. ss. this. bharatDataSet yy = new bharatDataSet(). this.SelectionFormula = "{productinsert. pi. } private void cmbboree_SelectedIndexChanged(object sender. crystalReportViewer1.cmbcompanyy.cmbclassificationn.company}='" + gg + "'".Text = "".cmblocation. bharatDataSetTableAdapters.Text = "".productinsert).Fill(yy. ss.bharatDataSetTableAdapters. StocklReport ss = new StocklReport(). crystalReportViewer1.ReportSource = ss.Text = "".Text.Fill(yy.Text = "". this. EventArgs e) { string gg.Text = "".Text.ReportSource = ss.cmbboree. this.cmbproname. gg = this.Text = "".cmbclassificationn.gunname}='" + gg + "'".productinsertTableAdapter pi = new Bharat_Gun_House.productinsert).cmbclassificationn.Text = "". bharatDataSet yy = new bharatDataSet().cmbpnamee.SetDataSource(yy). this. crystalReportViewer1. this.Text = "".bore}>0".StocklReport ss = new StocklReport().SelectionFormula = "{productinsert. this. } private void cmbcompanyy_SelectedIndexChanged(object sender. . bharatDataSetTableAdapters. crystalReportViewer1.productinsertTableAdapter().productinsertTableAdapter(). crystalReportViewer1.SetDataSource(yy). gg = this. this. EventArgs e) { string gg.SelectionFormula = "{productinsert.cmblocation.cmbboree. bharatDataSet yy = new bharatDataSet(). gg = this. crystalReportViewer1.productinsertTableAdapter pi = new Bharat_Gun_House. this.Fill(yy.cmbpnamee. crystalReportViewer1.cmbproname.productinsert). this.Fill(yy.productinsert). this.productinsertTableAdapter pi = new Bharat_Gun_House.Text.ReportSource = ss.gunname}='Rifle' and {productinsert.

} private void radarmss_CheckedChanged(object sender.ReportSource = ss.CheckState = CheckState. this. EventArgs e) { string gg.cmbpname.purchasedate}='" + gg + "'".StocklReport ss = new StocklReport(). } private void chpistolee_CheckStateChanged(object sender.productinsertTableAdapter pi = new Bharat_Gun_House.bharatDataSetTableAdapters. crystalReportViewer1. } private void dateTimee_ValueChanged(object sender. bharatDataSetTableAdapters.productinsertTableAdapter(). bharatDataSet yy = new bharatDataSet().chpistolee. } private void chgunn_CheckStateChanged(object sender.SelectionFormula = "{productinsert.ReportSource = ss.Fill(yy. this.Unchecked. StocklReport ss = new StocklReport().SelectionFormula = "{productinsert. this. } private void chrevolverr_CheckedChanged(object sender.SetDataSource(yy).cmblocation. EventArgs e) { bharatDataSet yy = new bharatDataSet().chgunn.productinsertTableAdapter().SetDataSource(yy).CheckState = CheckState.Unchecked.Text + "'and {productinsert. pi.CheckState = CheckState.chpistolee. crystalReportViewer1. bharatDataSetTableAdapters. crystalReportViewer1.CheckState = CheckState. this.bharatDataSetTableAdapters. crystalReportViewer1. ss. gg = this.Unchecked.bharatDataSetTableAdapters. this.CheckState = CheckState. ss. bharatDataSetTableAdapters.chriflee.chriflee. EventArgs e) .chgunn. EventArgs e) { bharatDataSet bh = new bharatDataSet().productinsert).ReportSource = ss. } private void button3_Click(object sender.gunname}='" + this.Unchecked.Text + "'".chriflee.productinsert).chrevolverr.CheckState = CheckState.chrevolverr. ss.CheckState = CheckState.CheckState = CheckState.dateTimee.SelectionFormula = "{productinsert.Fill(bh.bore}=" + gg + "".Unchecked.CheckState = CheckState.Unchecked.Unchecked. EventArgs e) { this. StocklReport ss = new StocklReport(). StocklReport ss = new StocklReport().Unchecked.ReportSource = ss.Unchecked.productinsert). pi.productinsertTableAdapter pi = new Bharat_Gun_House. EventArgs e) { this.Value.Fill(yy.Unchecked. this.CheckState = CheckState. this.CheckState = CheckState. this.chrevolverr. EventArgs e) { this. pi.location}='" + this.chgunn.CheckState = CheckState.ToShortDateString().productinsertTableAdapter().Unchecked. crystalReportViewer1.productinsertTableAdapter pi = new Bharat_Gun_House.SetDataSource(yy).SetDataSource(bh). EventArgs e) { this. } private void chriflee_CheckedChanged(object sender. crystalReportViewer1. crystalReportViewer1.Unchecked. } private void cmbpname_SelectedIndexChanged(object sender. ss.chpistolee.

productinsertTableAdapter(). bharatDataSetTableAdapters. pi. crystalReportViewer1.chpistolee.SetDataSource(yy).gunname}='Revolver' and {productinsert.gunname}='Pistole' and {productinsert.radammunationn.Checked && this.productinsertTableAdapter(). crystalReportViewer1.bharatDataSetTableAdapters.Checked) { bharatDataSet yy = new bharatDataSet(). } } private void radammunationn_CheckedChanged(object sender. ss. crystalReportViewer1.SelectionFormula = "{productinsert.SelectionFormula = "{productinsert.productinsert).SetDataSource(yy).Checked && this.Checked) { bharatDataSet yy = new bharatDataSet().Fill(yy.radammunationn.productinsertTableAdapter pi = new Bharat_Gun_House.chrevolverr. ss.productinsert). } { .Checked) { bharatDataSet yy = new bharatDataSet().Fill(yy. StocklReport ss = new StocklReport().ReportSource = ss.chgunn. crystalReportViewer1.productinsert).ReportSource = ss.productinsertTableAdapter pi = new Bharat_Gun_House.classification}='Ammunation'".if (this.productinsertTableAdapter pi = new Bharat_Gun_House.SelectionFormula = "{productinsert. ss. crystalReportViewer1.gunname}='Gun' and {productinsert. crystalReportViewer1. pi.classification}='Arms'". pi.ReportSource = ss. ss.productinsertTableAdapter().radarmss.productinsertTableAdapter(). bharatDataSetTableAdapters. ss.Checked && this.classification}='Ammunation'". pi.ReportSource = ss.bharatDataSetTableAdapters. StocklReport ss = new StocklReport().SelectionFormula = "{productinsert. crystalReportViewer1.Checked) { bharatDataSet yy = new bharatDataSet().classification}='Arms'".classification}='Arms'". bharatDataSetTableAdapters. crystalReportViewer1.radarmss. StocklReport ss = new StocklReport().productinsertTableAdapter pi = new Bharat_Gun_House.gunname}='Rifle' and {productinsert.SelectionFormula = "{productinsert. } if (this.gunname}='Gun' and {productinsert.productinsertTableAdapter pi = new Bharat_Gun_House. bharatDataSetTableAdapters.productinsert). crystalReportViewer1.SetDataSource(yy).bharatDataSetTableAdapters.bharatDataSetTableAdapters. bharatDataSetTableAdapters.SelectionFormula = "{productinsert.Fill(yy.productinsertTableAdapter().Checked && this.Checked && this.classification}='Arms'". EventArgs e) { if (this.chpistolee.Checked) { bharatDataSet yy = new bharatDataSet(). } if (this.chgunn. crystalReportViewer1.radarmss.ReportSource = ss.ReportSource = ss.Fill(yy.Fill(yy.gunname}='Pistole' and {productinsert. pi. bharatDataSetTableAdapters. StocklReport ss = new StocklReport().SetDataSource(yy).productinsert).productinsertTableAdapter pi = new Bharat_Gun_House. crystalReportViewer1. crystalReportViewer1.bharatDataSetTableAdapters. } if (this.Fill(yy.bharatDataSetTableAdapters. ss.chriflee.SetDataSource(yy).productinsertTableAdapter().radarmss. pi.productinsert). } if (this.Checked && this. StocklReport ss = new StocklReport().Checked) { bharatDataSet yy = new bharatDataSet(). StocklReport ss = new StocklReport().SetDataSource(yy).

SetDataSource(yy).radammunationn. StocklReport ss = new StocklReport().Checked && this. StocklReport ss = new StocklReport(). crystalReportViewer1. crystalReportViewer1.gunname}='Rifle' and {productinsert.gunname}='Revolver' and {productinsert.classification}='Acessories'".classification}='Acessories'".chgunn. crystalReportViewer1.Checked && this. pi.productinsert). bharatDataSetTableAdapters.Fill(yy. StocklReport ss = new StocklReport(). bharatDataSetTableAdapters.classification}='Acessories'". bharatDataSetTableAdapters.productinsert). } .productinsert). ss.productinsertTableAdapter pi = new Bharat_Gun_House.productinsert). } if (this.productinsertTableAdapter(). } } private void radacessoriess_CheckedChanged(object sender. crystalReportViewer1.SetDataSource(yy). crystalReportViewer1.SelectionFormula = "{productinsert.productinsertTableAdapter().if (this.bharatDataSetTableAdapters.radacessoriess. EventArgs e) { if (this.radacessoriess.Fill(yy.chriflee.classification}='Ammunation'". crystalReportViewer1.Fill(yy.SetDataSource(yy).bharatDataSetTableAdapters.chriflee.ReportSource = ss.Checked && this.gunname}='Revolver' and {productinsert. ss.productinsertTableAdapter pi = new Bharat_Gun_House.bharatDataSetTableAdapters.Checked && this.ReportSource = ss.bharatDataSetTableAdapters.Fill(yy.productinsertTableAdapter(). crystalReportViewer1.productinsertTableAdapter pi = new Bharat_Gun_House.classification}='Ammunation'".SetDataSource(yy). crystalReportViewer1. bharatDataSetTableAdapters. } if (this.productinsert). } if (this.gunname}='Rifle' and {productinsert.gunname}='Pistole' and {productinsert.productinsertTableAdapter pi = new Bharat_Gun_House.ReportSource = ss.bharatDataSetTableAdapters.productinsertTableAdapter pi = new Bharat_Gun_House.chrevolverr.productinsertTableAdapter().productinsert). pi.radacessoriess. StocklReport ss = new StocklReport().Checked) { bharatDataSet yy = new bharatDataSet().ReportSource = ss.SelectionFormula = "{productinsert.ReportSource = ss. crystalReportViewer1.SelectionFormula = "{productinsert.chpistolee.radammunationn. pi.chrevolverr.SetDataSource(yy).SelectionFormula = "{productinsert. pi.productinsertTableAdapter(). ss.Checked) { bharatDataSet yy = new bharatDataSet(). } if (this. crystalReportViewer1.productinsertTableAdapter().Fill(yy.Checked) { bharatDataSet yy = new bharatDataSet().bharatDataSetTableAdapters. pi.gunname}='Gun' and {productinsert.SelectionFormula = "{productinsert.radacessoriess.SelectionFormula = "{productinsert. crystalReportViewer1. ss.classification}='Acessories'".Checked && this.Checked) { bharatDataSet yy = new bharatDataSet(). pi.Checked) { bharatDataSet yy = new bharatDataSet().Checked) { bharatDataSet yy = new bharatDataSet().SetDataSource(yy). crystalReportViewer1.ReportSource = ss. ss.productinsertTableAdapter pi = new Bharat_Gun_House. bharatDataSetTableAdapters. StocklReport ss = new StocklReport().Checked && this. bharatDataSetTableAdapters. StocklReport ss = new StocklReport().Fill(yy. ss.

radboree.productinsert). crystalReportViewer1. } if (this. StocklReport ss = new StocklReport(). StocklReport ss = new StocklReport(). ss. } } private void datetime1_ValueChanged(object sender.ReportSource = ss.ReportSource = ss.SelectionFormula = "{productinsert.ReportSource = ss. ss.bore}>0". EventArgs e) { if (this.bharatDataSetTableAdapters.SelectionFormula = "{productinsert. System.Generic. crystalReportViewer1.Fill(yy.productinsertTableAdapter pi = new Bharat_Gun_House. String strr = this.bharatDataSetTableAdapters.SetDataSource(yy).Data.purchasedate}>= '" + strr1 + "' and {productinsert.gunname}='Pistole' and {productinsert.Checked && this.Windows.SelectionFormula = "{productinsert.SetDataSource(yy). pi.Checked) { bharatDataSet yy = new bharatDataSet(). crystalReportViewer1.radboree.ReportSource = ss.productinsertTableAdapter().ComponentModel.bharatDataSetTableAdapters.Checked) { bharatDataSet yy = new bharatDataSet().dateTimee.productinsert).gunname}='Rifle' and {productinsert.productinsert).purchasedate}<='" + strr + "'". } if (this.gunname}='Revolver' and {productinsert.Value. System.productinsertTableAdapter(). ss. bharatDataSetTableAdapters.Text.Drawing. System.chriflee.chpistolee.datetime1.Forms.ToShortDateString(). ss. .productinsertTableAdapter().Date. crystalReportViewer1.} private void radboree_CheckedChanged(object sender. System.productinsertTableAdapter pi = new Bharat_Gun_House. crystalReportViewer1. EventArgs e) { String strr1 = this. pi.radboree.productinsertTableAdapter pi = new Bharat_Gun_House.productinsertTableAdapter pi = new Bharat_Gun_House.bore}>0". } } } using using using using using using using System. bharatDataSet yy = new bharatDataSet(). crystalReportViewer1.Date. StocklReport ss = new StocklReport(). pi.bore}>0".productinsert). crystalReportViewer1.bharatDataSetTableAdapters.Fill(yy.Checked && this.Collections. bharatDataSetTableAdapters.ToShortDateString().chrevolverr.Value.productinsertTableAdapter(). bharatDataSetTableAdapters.Fill(yy.SetDataSource(yy). pi.Fill(yy. System.SetDataSource(yy). StocklReport ss = new StocklReport().SelectionFormula = "{productinsert. bharatDataSetTableAdapters. crystalReportViewer1.Checked && this.Checked) { bharatDataSet yy = new bharatDataSet(). System.

ExecuteReader().ToInt32(db.consignmentid = Convert.receivedetail).CommandText = "delete from receivedetail".NewreceivedetailRow().receivedetailTableAdapter().ExecuteNonQuery().namespace Bharat_Gun_House { public partial class Frmdaliyconreport : Form { public Frmdaliyconreport() { InitializeComponent().SetDataSource(da).com.SelectionFormula = "{receivedetail.Receivedate}='" + this. db. r.dr["subitemsid"]).classification = db.receivedetailTableAdapter ta = new Bharat_Gun_House.ReportSource = dl. ta. EventArgs e) { this. } private void dateTimePicker1_ValueChanged(object sender. ta.dateTimePicker1. EventArgs e) { } private void comboBox1_SelectedIndexChanged(object sender.Value.bharatDataSetTableAdapters. . } private void Frmdaliyconreport_Load(object sender.dr["sno"]). crystalReportViewer1. ta. EventArgs e) { bharatDataSet da = new bharatDataSet(). bharatDataSetTableAdapters.ToShortDateString() + "'". EventArgs e) { bharatDataSet da = new bharatDataSet(). bharatDataSetTableAdapters.bore = Convert. DailyConReport dl = new DailyConReport().receivedetail).Fill(da.SelectionFormula = "{receivedetail. db.SetDataSource(da).Value. r. EventArgs e) { try { db. dl.Sno = Convert. bharatDataSetTableAdapters.subitemsid = Convert.ToDecimal(db.Date.ToString(). } private void crystalReportViewer1_Load(object sender.Text+ "'".dr. crystalReportViewer1.com.receivedetailTableAdapter ta = new Bharat_Gun_House. crystalReportViewer1. dl.cmbparty. DailyConReport dl = new DailyConReport(). while (db.dr["consignmentid"]).com.Fill(da.CommandText = "Select * from consignment_view".dr["bore"]).dr["armsno"].ToInt32(db.receivedetailRow r = bharatDataSet.ToString(). r.bharatDataSetTableAdapters.Receivedate}='" + this.ReportSource = dl.receivedetailTableAdapter ta = new Bharat_Gun_House.SelectionFormula = "{receivedetail.armsno = db. r. r.ToShortDateString() + "'". crystalReportViewer1.receivedetailTableAdapter(). } private void button2_Click(object sender.receivedetailTableAdapter(). DailyConReport dl = new DailyConReport().receivedetail.dateTimePicker1.Date. crystalReportViewer1.dr = db.ReportSource = dl.receivedetail).partyname}='" +this.Close().com.dr["classification"]. } private void button1_Click(object sender.bharatDataSetTableAdapters. r. dl. db.Fill(da. crystalReportViewer1.ToInt32(db. EventArgs e) { bharatDataSet da = new bharatDataSet().SetDataSource(da).Read()) { bharatDataSet.

r.qty = Convert.dr["partyaddress"].dr[14]).receivedetail).dr["company"].Text. System.gunname = db. System.dr.ToString().Close().receivedetail. ret. ta.dr["nm"].receivedetailTableAdapter().Update(bharatDataSet. ConsinReturnReport cr = new ConsinReturnReport().dr["Type"].ToInt32(db.Lodertype = db.dr["useqty"]).ToInt32(db.dr["marketprice"]).ToString()).ToString(). cr.Show(ee.} catch (Exception ee) { MessageBox.ToString().com.ToInt32(db.company = db.bharatDataSetTableAdapters.ComponentModel.ToString()).dr.ConReturn).partyaddress = db.ReportSource = cr. EventArgs e) { bharatDataSet bh = new bharatDataSet(). r.remainingqty = Convert. r.ExecuteReader().ConReturnTableAdapter().ToInt32(db.dr.Add(db. r.ToString(). r.ReportSource = dl.dr["partyid"]). bharatDataSet. receivedetailTableAdapter. bharatDataSetTableAdapters. crystalReportViewer1.ToInt32(db. System. } db.Collections.dr["conreceivedate"].cmbparty. r.dr["location"]. dl. } db. r. r.Drawing. r.CommandText = "select distinct partyname as nm from consignment_view".Generic.ToString().partyname = db. } } } } db. EventArgs e) { bharatDataSet da = new bharatDataSet(). r. crystalReportViewer1. bharatDataSetTableAdapters.SetDataSource(da).location = db.marketprice = Convert.Rows.dr["gunname"]. .ToString(). r. r.Items.Add(r). using using using using using using using System. db.Windows.useqty = Convert.partyid = Convert.bharatDataSetTableAdapters.ToString().dr["lodertype"]. while (db.receivedate = db.Forms. DailyConReport dl = new DailyConReport().receivedetailTableAdapter ta = new Bharat_Gun_House.dr["partyname"].Fill(bh. System. namespace Bharat_Gun_House { public partial class FrmReturnrep : Form { public FrmReturnrep() { InitializeComponent().ToString()).Close(). System.com.Read()) { this.Fill(da. } private void button1_Click_1(object sender.receivedetail). System. r.Data. } private void FrmReturnrep_Load(object sender.type = db.ToString().dr["qty"].SetDataSource(bh).dr = db.ConReturnTableAdapter ret = new Bharat_Gun_House.

ret.SelectionFormula = "{Conreturn. crystalReportViewer1.cmbparty.db. EventArgs e) { bharatDataSet bh = new bharatDataSet().dr["pr"] != "") { this.ExecuteReader().ConReturnTableAdapter().com.CommandText = "select distinct party as par from conreturn".cmbparty.ReportSource = cr. cr. db.SetDataSource(bh).bharatDataSetTableAdapters.returndate}='" + this.Items. crystalReportViewer1.CommandText = "select distinct gunname as pr from conreturn". } } } . ConsinReturnReport cr = new ConsinReturnReport().ConReturnTableAdapter().Fill(bh.dr = db.Fill(bh.ReportSource = cr.SetDataSource(bh).com.ToString()).dateTimePicker1. ret.Add(db.cmbproductname.Add(db.ReportSource = cr. bharatDataSetTableAdapters. bharatDataSetTableAdapters.ToString()). crystalReportViewer1.ConReturnTableAdapter().dr. while (db.ConReturnTableAdapter ret = new Bharat_Gun_House. ConsinReturnReport cr = new ConsinReturnReport().ConReturn).com.bharatDataSetTableAdapters.ConReturnTableAdapter().SelectionFormula = "{Conreturn. crystalReportViewer1. } private void btnshowall_Click(object sender.ConReturn). } private void cmbproductname_SelectedIndexChanged(object sender. ConsinReturnReport cr = new ConsinReturnReport().ConReturnTableAdapter ret = new Bharat_Gun_House.dr = db.Close().dr["par"]. ConsinReturnReport cr = new ConsinReturnReport().ReportSource = cr.com.ToShortDateString() + "'".ConReturnTableAdapter ret = new Bharat_Gun_House. cr. crystalReportViewer1.Fill(bh. } private void dateTimePicker1_ValueChanged(object sender.Date.ExecuteReader().party}='" + this. EventArgs e) { bharatDataSet bh = new bharatDataSet().Close().Text + "'". bharatDataSetTableAdapters.Read()) { if (db. } } db.SetDataSource(bh). cr.dr["pr"].Items.dr["par"] != "") this.Fill(bh. cr.Text + "'".cmbproductname.SetDataSource(bh).Value.gunname}='" + this.ConReturn).ConReturnTableAdapter ret = new Bharat_Gun_House. } private void cmbparty_SelectedIndexChanged(object sender. } db. while(db.dr.dr.SelectionFormula = "{Conreturn.bharatDataSetTableAdapters.Read()) { if (db. crystalReportViewer1. db. ret. bharatDataSetTableAdapters. db.dr.ConReturn). EventArgs e) { bharatDataSet bh = new bharatDataSet(). ret. crystalReportViewer1. EventArgs e) { bharatDataSet bh = new bharatDataSet().bharatDataSetTableAdapters.

Read()) { this.dr["par"].ToString()).dr["pro"]. } private void FrmGivenToOtherReport_Load(object sender.Read()) { this.cmbparty.dr.Forms.com.CommandText = "select distinct itemname as pro from subitem". System. db. System.com. System.bharatDataSetTableAdapters.CommandText = "select distinct itemname as comp from items". giv.dr["comp"].bharatDataSetTableAdapters.SelectionFormula = "{GivenStock.GivenStockTableAdapter pa = new Bharat_Gun_House.GivenStockTableAdapter().Data.SetDataSource(bh). GiveDataToOtherPartyReport giv = new GiveDataToOtherPartyReport().bharatDataSetTableAdapters. System.Add(db.Date.com.Close(). } private void dateTimePicker1_ValueChanged(object sender. bharatDataSet bh = new bharatDataSet(). namespace Bharat_Gun_House { public partial class FrmGivenToOtherReport : Form { public FrmGivenToOtherReport() { InitializeComponent(). } db.Items.SetDataSource(bh).com.dr. System. db.ToString()).GivenStock).Items.Close().ReportSource = giv. } db.com.GivenStockTableAdapter pa = new Bharat_Gun_House. db.Fill(bh.ExecuteReader(). } db. EventArgs e) { bharatDataSet bh = new bharatDataSet().ToShortDateString() + "'". crystalReportViewer1.Value.GivenStock).Drawing.GivenStockTableAdapter(). db.givendate}='" + this.ComponentModel.dr = db. while (db.Generic. pa. GiveDataToOtherPartyReport giv = new GiveDataToOtherPartyReport().Text.using using using using using using using System.dr.cmbclassification. crystalReportViewer1.cmbproductname.GivenStock).ReportSource = gi. crystalReportViewer1. System. bharatDataSetTableAdapters. . GiveDataToOtherPartyReport gi = new GiveDataToOtherPartyReport().Items.CommandText = "select distinct partyname as par from party".GivenStockTableAdapter(). gi.GivenStockTableAdapter pa = new Bharat_Gun_House.dr.Collections.Windows.Fill(bh.Add(db.com. EventArgs e) { db.Close().ToString()).ExecuteReader().dr = db.ExecuteReader(). EventArgs e) { bharatDataSet bh = new bharatDataSet(). pa.dr. while (db.Fill(bh. bharatDataSetTableAdapters. bharatDataSetTableAdapters.dr. pa.Add(db. while (db.Read()) { this. db.dateTimePicker1.dr = db. } private void cmbproductname_SelectedIndexChanged(object sender.

SetDataSource(bh). this.ReportSource = giv. crystalReportViewer1. System. bharatDataSetTableAdapters. crystalReportViewer1. GiveDataToOtherPartyReport giv = new GiveDataToOtherPartyReport().Text = "".Text = "". } private void cmbparty_SelectedIndexChanged(object sender.SetDataSource(bh).GivenStockTableAdapter pa = new Bharat_Gun_House.cmbproductname.Text+"'". System.cmbproductname.cmbparty.bharatDataSetTableAdapters.cmbclassification. crystalReportViewer1. namespace Bharat_Gun_House { public partial class FrmReturnOwnData : Form { public FrmReturnOwnData() { .classification}='"+this. pa.SetDataSource(bh). EventArgs e) { bharatDataSet bh = new bharatDataSet().bharatDataSetTableAdapters. System. bharatDataSetTableAdapters.Generic.GivenStock). bharatDataSet bh = new bharatDataSet().GivenStockTableAdapter().ReportSource = giv.ReportSource = giv.GivenStock).Collections. GiveDataToOtherPartyReport giv = new GiveDataToOtherPartyReport().Windows. this. giv. crystalReportViewer1.Fill(bh. pa.GivenStockTableAdapter().Fill(bh. bharatDataSetTableAdapters. this. this. System.SelectionFormula = "{GivenStock.ComponentModel.Text = "".GivenStockTableAdapter pa = new Bharat_Gun_House.Text = "".gunname}='"+this.cmbparty.Forms.name}='" +cm+ "'". this. crystalReportViewer1. } } } using using using using using using using System.Data. giv.cmbclassification. } private void BTNSHOWALL_Click(object sender. pa. crystalReportViewer1. System.GivenStockTableAdapter().ReportSource = giv.Text.Text = "".Text = "".cmbclassification. crystalReportViewer1.cmbproductname.GivenStock).Fill(bh. giv.GivenStockTableAdapter pa = new Bharat_Gun_House. GiveDataToOtherPartyReport giv = new GiveDataToOtherPartyReport().cmbparty.Text+"'".Drawing. System.Text.giv.bharatDataSetTableAdapters.SelectionFormula = "{GivenStock. } private void cmbclassification_SelectedIndexChanged(object sender.SetDataSource(bh). EventArgs e) { bharatDataSet bh = new bharatDataSet().SelectionFormula = "{GivenStock. EventArgs e) { string cm = this. this.

com.ReturnStock).Items.ReturnStockTableAdapter redata = new Bharat_Gun_House.ExecuteReader().Items.Close(). redata.com.Items.com. EventArgs e) { bharatDataSet bh = new bharatDataSet(). } db.SetDataSource(bh). db.dr.dr.bharatDataSetTableAdapters. crystalReportViewer1. db. crystalReportViewer1.name}='"+this.dr = db. while (db.dr = db.SelectionFormula = "{ReturnStock. db.ReturnStockTableAdapter redata = new Bharat_Gun_House.ReturnStockTableAdapter().Fill(bh. db. this. redata.Close().com.Fill(bh. db. bharatDataSetTableAdapters.Close(). rdata.SetDataSource(bh). crystalReportViewer1.dr = db. bharatDataSetTableAdapters. crystalReportViewer1.CommandText = "select distinct itemname as clas from items".ReportSource = rdata.Text+"'". this.classification}='" + this.com. while (db.Fill(bh.cmbclassification.ToString()).Text = "".ReturnStock).dr.ToString()).Add(db.Close().cmbclassification.CommandText = "select distinct itemname as prna from subitem". db. this. crystalReportViewer1.CommandText = "select distinct company as cna from productinsert".ExecuteReader().Read()) { this.SelectionFormula = "{ReturnStock.ToString()). } db.Read()) { this. EventArgs e) { bharatDataSet bh = new bharatDataSet().Read()) { this.com.ReturnStockTableAdapter(). this. while (db.ReturnStockTableAdapter redata = new Bharat_Gun_House.dr. } private void cmbclassification_SelectedIndexChanged(object sender.Text = "".CommandText = "select distinct partyname as pa from party". rdata. } db.Text = "".dr["cna"]. ReturnOwnData rdata = new ReturnOwnData(). db.Text + "'".dr = db.Add(db.com.cmbparty.dr["prna"].ReportSource = rdata. ReturnOwnData rdata = new ReturnOwnData(). private void FrmReturnOwnData_Load(object sender.cmbproductname.cmbcompanyname.Text = "".cmbproductname. db.cmbproductname. } .dr.cmbcompanyname.Text = "". this.dr["pa"].ReportSource = rdata. while (db.SetDataSource(bh).cmbparty.Items.dr.cmbparty.Read()) { this. } db. } private void cmbparty_SelectedIndexChanged(object sender.Add(db.bharatDataSetTableAdapters.} InitializeComponent().cmbclassification.dr["clas"].Add(db.cmbcompanyname. redata.ReturnStockTableAdapter().com.dr.ReturnStock).ExecuteReader().ToString()). rdata.Text = "". EventArgs e) { bharatDataSet bh = new bharatDataSet(). this. ReturnOwnData rdata = new ReturnOwnData().dr.bharatDataSetTableAdapters.ExecuteReader(). bharatDataSetTableAdapters.

crystalReportViewer1.cmbparty. ReturnOwnData rdata = new ReturnOwnData().SetDataSource(bh).Fill(bh.cmbcompanyname.private void cmbcompanyname_SelectedIndexChanged(object sender. this.SetDataSource(bh). bharatDataSetTableAdapters.Text = "".ReturnStockTableAdapter().SelectionFormula = "{ReturnStock.ReportSource = rdata.SelectionFormula = "{ReturnStock. red.ReturnStock).Text = "".cmbclassification.ReportSource = rdata. this. this. rdata.bharatDataSetTableAdapters.cmbclassification.ReturnStock). rdata. crystalReportViewer1. redata. } } } . this.Text = "". bharatDataSetTableAdapters. EventArgs e) { bharatDataSet bh = new bharatDataSet().ReturnStockTableAdapter redata = new Bharat_Gun_House.Date.ReturnStock).bharatDataSetTableAdapters.Fill(bh. bharatDataSetTableAdapters. this. this.bharatDataSetTableAdapters. } private void btnshowall_Click(object sender. crystalReportViewer1.Fill(bh.cmbproductname. ReturnOwnData rdata = new ReturnOwnData(). } private void datetime_ValueChanged(object sender.Text = "". this. crystalReportViewer1.cmbclassification. this.ReportSource = rdata.ReturnStockTableAdapter(). redata.Text = "". crystalReportViewer1.SetDataSource(bh).Text = "".SetDataSource(bh). crystalReportViewer1.cmbproductname. redata.givendate}='" + this. rdata. ReturnOwnData red = new ReturnOwnData().Fill(bh.Text = "". rr.ReturnStock).ToShortDateString() + "'".cmbcompanyname.Value.ReturnStockTableAdapter(). this. ReturnOwnData rdata = new ReturnOwnData().ReturnStockTableAdapter rr = new Bharat_Gun_House.ReturnStockTableAdapter().company}='" + this. this.Text = "".Text + "'".cmbcompanyname.cmbparty.Text = "".ReportSource = red. bharatDataSetTableAdapters.datetime.Text + "'".gunname}='" + this.ReturnStockTableAdapter redata = new Bharat_Gun_House.cmbparty.bharatDataSetTableAdapters.Text = "". EventArgs e) { bharatDataSet bh = new bharatDataSet().ReturnStockTableAdapter redata = new Bharat_Gun_House.cmbproductname. } private void cmbproductname_SelectedIndexChanged(object sender. EventArgs e) { bharatDataSet bh = new bharatDataSet(). EventArgs e) { bharatDataSet bh = new bharatDataSet(). crystalReportViewer1.SelectionFormula = "{ReturnStock.

CommandText = "select distinct location as gg from productinsert ".ExecuteReader(). } .Windows.Add(db. } db.cmbpname.cmbclassificationn.dr = db. db.dr = db.ReportSource = ss.dr = db.dr.dr["gg"]. while(db.ExecuteReader(). System.cmbboree. while (db.com.Add(db.Add(db. System.ToString()).Close().com.Items. db. crystalReportViewer1. db.ToString()). while (db.Items. System.dr.dr.Generic. pi.cmbpnamee. ss.Read()) { this.bharatDataSetTableAdapters.productinsertTableAdapter pi = new Bharat_Gun_House.ToString()).using using using using using using using System. } private void StockReortFrm_Load(object sender.dr.Close().dr.Read()) { this.SetDataSource(bh).com.Fill(bh. } db.dr["gg"].Add(db.Read()) { this.dr.dr.ToString()). db. StocklReport ss = new StocklReport(). db.CommandText = "select distinct gunname as gg from productinsert ".Items.com.Read()) { this.ToString()).com.Read()) { this.Read()) { this.dr.Forms.Close().Items.ExecuteReader(). db.dr["gg"].CommandText = "select distinct classification as gg from productinsert db.productinsertTableAdapter().Items. namespace Bharat_Gun_House { public partial class StockReortFrm : Form { public StockReortFrm() { InitializeComponent().com.ToString()). } db.com. System.dr = db. } db.cmbcompanyy.com. while (db.CommandText = "select distinct bore as gg from productinsert ".dr. while (db.productinsert).com.ComponentModel. db.Close(). db.Data.dr["gg"].ExecuteReader(). System.ExecuteReader().CommandText = "select distinct gunname as gg from productinsert ". while (db. bharatDataSetTableAdapters.Items.dr = db.Text. EventArgs e) { bharatDataSet bh = new bharatDataSet().ExecuteReader().dr["gg"]. db. System. } db.cmblocation.com.Drawing. db.dr.dr = db.Collections.Add(db.com.Add(db. ".dr["gg"]. db.dr.com.CommandText = "select distinct company as gg from productinsert ".Close().

} .productinsertTableAdapter().dateTimePicker1.Fill(yy. gg = this. EventArgs e) { string gg.gunname}='Gun' and {productinsert.productinsert).SelectionFormula = "{productinsert.bharatDataSetTableAdapters. bharatDataSetTableAdapters.cmbproname. bharatDataSetTableAdapters.SelectionFormula = "{productinsert. gg = this.SetDataSource(yy).gunname}='" + gg + "'". } private void button4_Click(object sender. StocklReport ss = new StocklReport(). bharatDataSetTableAdapters.productinsert). pi. crystalReportViewer1. } private void cmbclas_SelectedValueChanged(object sender. bharatDataSet yy = new bharatDataSet().Fill(yy. crystalReportViewer1.Value.bharatDataSetTableAdapters.ReportSource = ss.productinsertTableAdapter pi = new Bharat_Gun_House. gg = this.ReportSource = ss.Checked) { bharatDataSet yy = new bharatDataSet(). pi.SetDataSource(yy). StocklReport ss = new StocklReport().SelectionFormula = "{productinsert. crystalReportViewer1.bharatDataSetTableAdapters.productinsertTableAdapter pi = new Bharat_Gun_House.classification}='" + gg + "'". } private void dateTimePicker1_ValueChanged(object sender.SetDataSource(yy).productinsertTableAdapter().ReportSource = ss.Text.productinsertTableAdapter pi = new Bharat_Gun_House. ss.productinsertTableAdapter pi = new Bharat_Gun_House.bharatDataSetTableAdapters.classification}='Arms'".ReportSource = ss. ss.dr. crystalReportViewer1.ReportSource = ss.Text. crystalReportViewer1.Fill(yy.purchasedate}='" + gg + "'".Checked && this. gg = this.productinsert).company}='" + gg + "'".SelectionFormula = "{productinsert. EventArgs e) { if (this.SetDataSource(yy).Close().Text. bharatDataSetTableAdapters.productinsertTableAdapter().Fill(yy. EventArgs e) { string gg. bharatDataSet yy = new bharatDataSet(). pi. } private void cmbproname_SelectedValueChanged(object sender. EventArgs e) { string gg.ToShortDateString().bharatDataSetTableAdapters.productinsertTableAdapter(). bharatDataSet yy = new bharatDataSet(). crystalReportViewer1. bharatDataSetTableAdapters.SelectionFormula = "{productinsert. ss.Fill(yy. pi.chgunn.productinsert). StocklReport ss = new StocklReport(). ss. StocklReport ss = new StocklReport().cmbcompany. crystalReportViewer1. crystalReportViewer1.db. EventArgs e) { string gg. crystalReportViewer1. pi.productinsertTableAdapter(). } private void cmbcompany_SelectedValueChanged(object sender.productinsertTableAdapter pi = new Bharat_Gun_House.radarmss. crystalReportViewer1.cmbclas.SetDataSource(yy). ss. StocklReport ss = new StocklReport(). bharatDataSet yy = new bharatDataSet().productinsert).

bharatDataSetTableAdapters. StocklReport ss = new StocklReport(). bharatDataSetTableAdapters.Checked && this.SelectionFormula = "{productinsert.chgunn.gunname}='Pistole' and {productinsert. ss.radboree.chpistolee. } if (this.radboree.productinsertTableAdapter pi = new Bharat_Gun_House. crystalReportViewer1.chgunn. pi.productinsert).SetDataSource(yy). crystalReportViewer1. StocklReport ss = new StocklReport().Fill(yy. . bharatDataSetTableAdapters.SetDataSource(yy). } if (this.productinsertTableAdapter pi = new Bharat_Gun_House. } if (this.radacessoriess.Fill(yy. crystalReportViewer1. StocklReport ss = new StocklReport().SetDataSource(yy).productinsert).SelectionFormula = "{productinsert.productinsertTableAdapter pi = new Bharat_Gun_House.Fill(yy. crystalReportViewer1.gunname}='Gun' and {productinsert.Fill(yy.productinsertTableAdapter pi = new Bharat_Gun_House.Checked && this. ss. } if (this.productinsertTableAdapter().bharatDataSetTableAdapters. crystalReportViewer1.chgunn.bharatDataSetTableAdapters.Checked && this. crystalReportViewer1.bharatDataSetTableAdapters.productinsertTableAdapter pi = new Bharat_Gun_House.productinsertTableAdapter pi = new Bharat_Gun_House.chpistolee.gunname}='Gun' and {productinsert.ReportSource = ss.Checked) { bharatDataSet yy = new bharatDataSet().SelectionFormula = "{productinsert. pi.classification}='Acessories'".gunname}='Gun' and {productinsert.classification}='Arms'".radacessoriess.Checked && this.ReportSource = ss.classification}='Ammunation'".gunname}='Pistole' and {productinsert. bharatDataSetTableAdapters.chpistolee.Checked) { bharatDataSet yy = new bharatDataSet(). StocklReport ss = new StocklReport().gunname}='Pistole' and {productinsert.Fill(yy. pi.productinsertTableAdapter(). crystalReportViewer1. ss.Checked) { bharatDataSet yy = new bharatDataSet().bharatDataSetTableAdapters.classification}='Acessories'".SelectionFormula = "{productinsert.ReportSource = ss.ReportSource = ss. crystalReportViewer1. crystalReportViewer1.radammunationn.Fill(yy.if (this.productinsertTableAdapter().ReportSource = ss. pi. } if (this.productinsert).bore}>0".SetDataSource(yy).SetDataSource(yy).Checked && this. crystalReportViewer1. bharatDataSetTableAdapters.productinsert). bharatDataSetTableAdapters.ReportSource = ss. pi.Checked && this.Checked) { bharatDataSet yy = new bharatDataSet(). ss.bharatDataSetTableAdapters. ss. ss.productinsertTableAdapter(). bharatDataSetTableAdapters.productinsertTableAdapter().chpistolee.classification}='Ammunation'".productinsertTableAdapter pi = new Bharat_Gun_House. crystalReportViewer1.bharatDataSetTableAdapters.Checked) { bharatDataSet yy = new bharatDataSet().SelectionFormula = "{productinsert.SetDataSource(yy). bharatDataSetTableAdapters.SelectionFormula = "{productinsert.productinsert). StocklReport ss = new StocklReport().radarmss. pi. crystalReportViewer1.productinsertTableAdapter(). StocklReport ss = new StocklReport().Checked) { bharatDataSet yy = new bharatDataSet().radammunationn.Checked && this.productinsert).Checked) { bharatDataSet yy = new bharatDataSet().productinsertTableAdapter(). } if (this.

pi. StocklReport ss = new StocklReport().classification}='Arms'".pi.Checked) { bharatDataSet yy = new bharatDataSet().productinsertTableAdapter pi = new Bharat_Gun_House. ss.SetDataSource(yy).productinsert). } if (this.productinsert).productinsertTableAdapter pi = new Bharat_Gun_House. crystalReportViewer1. crystalReportViewer1.productinsertTableAdapter().Checked && this. crystalReportViewer1.classification}='Arms'".ReportSource = ss.SelectionFormula = "{productinsert.bharatDataSetTableAdapters.ReportSource = ss.Checked) { bharatDataSet yy = new bharatDataSet().radacessoriess.productinsertTableAdapter().Checked && this.radarmss. bharatDataSetTableAdapters.Checked) { bharatDataSet yy = new bharatDataSet(). } if (this. pi.productinsertTableAdapter pi = new Bharat_Gun_House.SetDataSource(yy).gunname}='Revolver' and {productinsert. } if (this.bharatDataSetTableAdapters.gunname}='Revolver' and {productinsert.productinsert). ss.productinsertTableAdapter(). pi. } if (this.Fill(yy.SetDataSource(yy). StocklReport ss = new StocklReport(). bharatDataSetTableAdapters.radboree. crystalReportViewer1.chrevolverr.productinsertTableAdapter().Checked) { bharatDataSet yy = new bharatDataSet().SetDataSource(yy).productinsert).chriflee.classification}='Acessories'". } if (this.chrevolverr.Fill(yy.gunname}='Pistole' and {productinsert. bharatDataSetTableAdapters.chrevolverr.SelectionFormula = "{productinsert.chriflee.gunname}='Revolver' and {productinsert.radarmss.SelectionFormula = "{productinsert. crystalReportViewer1.productinsertTableAdapter(). bharatDataSetTableAdapters.SetDataSource(yy).Checked && this.radammunationn.bore}>0".productinsert).Checked) { bharatDataSet yy = new bharatDataSet().productinsert). StocklReport ss = new StocklReport(). crystalReportViewer1.gunname}='Rifle' and {productinsert.productinsertTableAdapter pi = new Bharat_Gun_House.ReportSource = ss. crystalReportViewer1.Checked && this. StocklReport ss = new StocklReport().ReportSource = ss. crystalReportViewer1.Checked) { bharatDataSet yy = new bharatDataSet(). StocklReport ss = new StocklReport().ReportSource = ss.ReportSource = ss. crystalReportViewer1. crystalReportViewer1. .bharatDataSetTableAdapters.Fill(yy. pi. ss.bharatDataSetTableAdapters. StocklReport ss = new StocklReport().ReportSource = ss.gunname}='Revolver' and {productinsert. bharatDataSetTableAdapters.radammunationn.Checked && this.SelectionFormula = "{productinsert.Fill(yy. ss.productinsertTableAdapter pi = new Bharat_Gun_House.SelectionFormula = "{productinsert.bharatDataSetTableAdapters.productinsert).chrevolverr. crystalReportViewer1. ss.SelectionFormula = "{productinsert.bore}>0". StocklReport ss = new StocklReport().productinsertTableAdapter(). crystalReportViewer1. ss. pi.productinsertTableAdapter pi = new Bharat_Gun_House.classification}='Ammunation'".SetDataSource(yy).Fill(yy. } if (this. pi.bharatDataSetTableAdapters.Checked && this. bharatDataSetTableAdapters.Fill(yy.SetDataSource(yy). ss. crystalReportViewer1.Fill(yy.

Text = "". pi. bharatDataSetTableAdapters.productinsertTableAdapter pi = new Bharat_Gun_House.Text = "".Text.Text = "".productinsert).cmbclassificationn.Text = "". this.bharatDataSetTableAdapters. bharatDataSet yy = new bharatDataSet(). StocklReport ss = new StocklReport().SetDataSource(yy).SelectionFormula = "{productinsert.gunname}='" + gg + "'".bore}>0". gg = this. ss. crystalReportViewer1.productinsert). bharatDataSetTableAdapters. crystalReportViewer1.cmbboree.gunname}='Rifle' and {productinsert.Text = "".Fill(yy.productinsertTableAdapter(). EventArgs e) { string gg. StocklReport ss = new StocklReport().bharatDataSetTableAdapters.Text. this.Checked && this. this.Checked) { bharatDataSet yy = new bharatDataSet().Fill(yy. pi. } if (this. EventArgs e) { string gg.Fill(yy. this.cmbproname.productinsert).productinsertTableAdapter pi = new Bharat_Gun_House. pi.SelectionFormula = "{productinsert. } private void cmbclassificationn_SelectedIndexChanged(object sender. gg = this. crystalReportViewer1.bharatDataSetTableAdapters.cmbpnamee.cmbboree.SelectionFormula = "{productinsert.classification}='Acessories'".gunname}='Rifle' and {productinsert.productinsertTableAdapter pi = new Bharat_Gun_House.company}='" + gg + "'".bharatDataSetTableAdapters. bharatDataSet yy = new bharatDataSet().productinsertTableAdapter().cmbclassificationn.Text = "". ss. crystalReportViewer1. this.cmbcompanyy.ReportSource = ss.gunname}='Rifle' and {productinsert. ss.chriflee. this. . pi.SelectionFormula = "{productinsert.classification}='Ammunation'". bharatDataSet yy = new bharatDataSet().SetDataSource(yy).cmbproname.ReportSource = ss.Text = "".productinsert). crystalReportViewer1.SetDataSource(yy). this.cmbcompanyy.Checked) { bharatDataSet yy = new bharatDataSet(). crystalReportViewer1. this.Text = "". } if (this.SelectionFormula = "{productinsert.productinsertTableAdapter().Text = "". bharatDataSetTableAdapters.productinsertTableAdapter pi = new Bharat_Gun_House.productinsertTableAdapter().bharatDataSetTableAdapters.radboree. StocklReport ss = new StocklReport().ReportSource = ss. bharatDataSetTableAdapters.chriflee.cmbclassificationn. StocklReport ss = new StocklReport(). crystalReportViewer1. crystalReportViewer1.cmbpnamee. gg = this. } private void cmbcompanyy_SelectedIndexChanged(object sender.productinsertTableAdapter().productinsertTableAdapter pi = new Bharat_Gun_House. this. bharatDataSetTableAdapters.Text.cmblocation.cmblocation. EventArgs e) { string gg.Fill(yy. ss. } } private void cmbpnamee_SelectedIndexChanged(object sender.SetDataSource(yy).Checked && this.radacessoriess.ReportSource = ss.crystalReportViewer1.Text = "". this.

} private void chpistolee_CheckStateChanged(object sender.productinsertTableAdapter pi = new Bharat_Gun_House.Text + "'and {productinsert.cmbproname. StocklReport ss = new StocklReport().location}='" + this.cmblocation. EventArgs e) { string gg.ReportSource = ss.productinsert). StocklReport ss = new StocklReport(). crystalReportViewer1.dateTimee.productinsertTableAdapter().gg + "'".SetDataSource(yy).productinsertTableAdapter(). crystalReportViewer1. ss. EventArgs e) { string gg.chrevolverr. pi. } private void button3_Click(object sender. StocklReport ss = new StocklReport().Fill(yy.ToShortDateString().SetDataSource(yy). bharatDataSetTableAdapters. this.Unchecked.Text + "'".bharatDataSetTableAdapters.productinsert).productinsertTableAdapter().CheckState = CheckState. bharatDataSetTableAdapters. this.Unchecked. } private void cmbboree_SelectedIndexChanged(object sender.Text = "".SelectionFormula = "{productinsert.Value.gunname}='" + this.Text = "". crystalReportViewer1. bharatDataSet yy = new bharatDataSet().Text = "".chgunn. . crystalReportViewer1.Fill(yy.SelectionFormula = "{productinsert.Text. ss. crystalReportViewer1. pi.chriflee.SetDataSource(yy). } private void cmbpname_SelectedIndexChanged(object sender. EventArgs e) { bharatDataSet bh = new bharatDataSet(). EventArgs e) { bharatDataSet yy = new bharatDataSet().Fill(bh.cmbboree. gg = this.Text = "". ss.Unchecked.Fill(yy. this.chrevolverr. crystalReportViewer1.productinsertTableAdapter pi = new Bharat_Gun_House. crystalReportViewer1.cmbclassificationn.cmbcompanyy.productinsert).purchasedate}='" + gg + "'".SetDataSource(yy).ReportSource = ss. EventArgs e) { this.ReportSource = ss.SetDataSource(bh). pi.Fill(yy.bharatDataSetTableAdapters. bharatDataSetTableAdapters. } private void chgunn_CheckStateChanged(object sender.CheckState = CheckState. StocklReport ss = new StocklReport().Unchecked. crystalReportViewer1. this.productinsert).productinsert). EventArgs e) { this. bharatDataSet yy = new bharatDataSet(). ss.productinsertTableAdapter pi = new Bharat_Gun_House. StocklReport ss = new StocklReport().cmbpname. } private void dateTimee_ValueChanged(object sender.bharatDataSetTableAdapters. ss. this.CheckState = CheckState. bharatDataSetTableAdapters.cmblocation.CheckState = CheckState.bharatDataSetTableAdapters.ReportSource = ss. this. crystalReportViewer1. pi.cmbboree.productinsertTableAdapter pi = new Bharat_Gun_House.SelectionFormula = "{productinsert. gg = this.productinsertTableAdapter().bore}=" + gg + "".ReportSource = ss.SelectionFormula = "{productinsert.Text = "". pi.classification}='" + this.

Checked) { bharatDataSet yy = new bharatDataSet().chriflee.productinsertTableAdapter pi = new Bharat_Gun_House.ReportSource = ss.chriflee.chgunn.bharatDataSetTableAdapters. EventArgs e) { this. pi. } if (this. ss.productinsert).Fill(yy. crystalReportViewer1.productinsertTableAdapter().Unchecked. EventArgs e) { if (this.radarmss.gunname}='Rifle' and {productinsert.productinsert).gunname}='Pistole' and {productinsert. pi. pi.radarmss.Checked && this.classification}='Arms'". bharatDataSetTableAdapters.radarmss.Checked && this.productinsertTableAdapter().Fill(yy. } private void radarmss_CheckedChanged(object sender.CheckState = CheckState. crystalReportViewer1.chgunn. StocklReport ss = new StocklReport().bharatDataSetTableAdapters.ReportSource = ss.SelectionFormula = "{productinsert.Checked) { bharatDataSet yy = new bharatDataSet(). ss.radarmss.chpistolee. bharatDataSetTableAdapters.Unchecked.this. ss. StocklReport ss = new StocklReport(). this.classification}='Arms'".CheckState = CheckState.SetDataSource(yy).chgunn.CheckState = CheckState.SetDataSource(yy). crystalReportViewer1. StocklReport ss = new StocklReport(). } private void chrevolverr_CheckedChanged(object sender.Checked) { bharatDataSet yy = new bharatDataSet().CheckState = CheckState.chriflee. ss.Fill(yy.Fill(yy.productinsert). bharatDataSetTableAdapters. StocklReport ss = new StocklReport().bharatDataSetTableAdapters.radammunationn.classification}='Arms'".ReportSource = ss.chpistolee.chpistolee.gunname}='Revolver' and {productinsert.Checked && this. crystalReportViewer1. this.Checked && this. crystalReportViewer1. this.Unchecked.productinsertTableAdapter pi = new Bharat_Gun_House.Checked && this. this.gunname}='Gun' and {productinsert.SelectionFormula = "{productinsert.CheckState = CheckState.productinsert).classification}='Arms'".Checked) { bharatDataSet yy = new bharatDataSet().CheckState = CheckState. } if (this.Checked) { bharatDataSet yy = new bharatDataSet().Unchecked.chpistolee. } private void chriflee_CheckedChanged(object sender.Unchecked.CheckState = CheckState.Unchecked.SetDataSource(yy). bharatDataSetTableAdapters.productinsertTableAdapter pi = new Bharat_Gun_House. crystalReportViewer1. } if (this.ReportSource = ss. EventArgs e) { if (this.productinsertTableAdapter pi = new Bharat_Gun_House.CheckState = CheckState.chgunn.Unchecked.SelectionFormula = "{productinsert.Unchecked. } } private void radammunationn_CheckedChanged(object sender. this.bharatDataSetTableAdapters. .productinsertTableAdapter().chrevolverr. crystalReportViewer1. crystalReportViewer1. EventArgs e) { this.productinsertTableAdapter(). pi.SelectionFormula = "{productinsert.SetDataSource(yy).chrevolverr.

SetDataSource(yy).Checked && this.productinsertTableAdapter().Checked) { bharatDataSet yy = new bharatDataSet().ReportSource = ss.productinsertTableAdapter(). crystalReportViewer1. ss.bharatDataSetTableAdapters. crystalReportViewer1.gunname}='Gun' and {productinsert.productinsertTableAdapter pi = new Bharat_Gun_House. pi. } } private void radacessoriess_CheckedChanged(object sender.productinsert).Fill(yy.Checked && this. ss. crystalReportViewer1. crystalReportViewer1.productinsert).Checked && this. } if (this.SelectionFormula = "{productinsert.productinsertTableAdapter(). pi. StocklReport ss = new StocklReport(). EventArgs e) { if (this. crystalReportViewer1. bharatDataSetTableAdapters. crystalReportViewer1.Checked) { bharatDataSet yy = new bharatDataSet().ReportSource = ss.bharatDataSetTableAdapters.SetDataSource(yy). crystalReportViewer1.bharatDataSetTableAdapters.ReportSource = ss.classification}='Acessories'". crystalReportViewer1.chpistolee.productinsertTableAdapter pi = new Bharat_Gun_House. bharatDataSetTableAdapters. pi. crystalReportViewer1.SelectionFormula = "{productinsert.SelectionFormula = "{productinsert.Checked && this.SetDataSource(yy).SelectionFormula = "{productinsert.SetDataSource(yy).bharatDataSetTableAdapters.gunname}='Pistole' and {productinsert.chrevolverr.classification}='Ammunation'". crystalReportViewer1. ss. StocklReport ss = new StocklReport(). bharatDataSetTableAdapters.Checked) { bharatDataSet yy = new bharatDataSet().productinsert).chriflee.classification}='Acessories'".productinsert).radammunationn. } if (this.ReportSource = ss.radammunationn.classification}='Ammunation'". } if (this.radacessoriess.productinsertTableAdapter().classification}='Ammunation'".Fill(yy.gunname}='Pistole' and {productinsert.Fill(yy.gunname}='Revolver' and {productinsert.radacessoriess.Fill(yy.SelectionFormula = "{productinsert.Checked && this. pi.chpistolee. .Checked) { bharatDataSet yy = new bharatDataSet().bharatDataSetTableAdapters. bharatDataSetTableAdapters. bharatDataSetTableAdapters.productinsertTableAdapter pi = new Bharat_Gun_House.Checked && this.chrevolverr. ss.bharatDataSetTableAdapters.SetDataSource(yy).chgunn.ReportSource = ss.productinsertTableAdapter(). ss.radacessoriess.productinsertTableAdapter pi = new Bharat_Gun_House.Checked) { bharatDataSet yy = new bharatDataSet().Checked) { bharatDataSet yy = new bharatDataSet(). StocklReport ss = new StocklReport(). } if (this.gunname}='Gun' and {productinsert.SetDataSource(yy).productinsertTableAdapter pi = new Bharat_Gun_House.Fill(yy. } if (this. crystalReportViewer1.bharatDataSetTableAdapters. crystalReportViewer1. ss.productinsert).productinsert).productinsertTableAdapter pi = new Bharat_Gun_House.classification}='Ammunation'".Fill(yy.radammunationn.gunname}='Rifle' and {productinsert. pi.SelectionFormula = "{productinsert.productinsertTableAdapter(). StocklReport ss = new StocklReport(). StocklReport ss = new StocklReport(). pi. StocklReport ss = new StocklReport().ReportSource = ss.

ReportSource = ss.datetime1. bharatDataSetTableAdapters.classification}='Acessories'".ReportSource = ss. crystalReportViewer1.productinsertTableAdapter(). pi.productinsertTableAdapter pi = new Bharat_Gun_House.chriflee. bharatDataSetTableAdapters. ss.Checked && this.Value.gunname}='Revolver' and {productinsert.bharatDataSetTableAdapters.productinsertTableAdapter pi = new Bharat_Gun_House. crystalReportViewer1.SelectionFormula = "{productinsert. bharatDataSetTableAdapters.bharatDataSetTableAdapters. bharatDataSetTableAdapters.ReportSource = ss. StocklReport ss = new StocklReport(). } } private void datetime1_ValueChanged(object sender.radboree.SetDataSource(yy).bore}>0". pi.chrevolverr.productinsertTableAdapter(). StocklReport ss = new StocklReport(). ss.gunname}='Rifle' and {productinsert.SetDataSource(yy).bharatDataSetTableAdapters.productinsertTableAdapter pi = new Bharat_Gun_House. crystalReportViewer1. crystalReportViewer1.dateTimee.Date. crystalReportViewer1.Checked && this.radacessoriess.Checked && this.gunname}='Revolver' and {productinsert.gunname}='Pistole' and {productinsert.Fill(yy.productinsertTableAdapter pi = new Bharat_Gun_House.Checked) { bharatDataSet yy = new bharatDataSet().SetDataSource(yy). crystalReportViewer1.Fill(yy.bharatDataSetTableAdapters. crystalReportViewer1.chpistolee.productinsert). StocklReport ss = new StocklReport().productinsertTableAdapter().productinsert). String strr = this. crystalReportViewer1. } if (this. pi. StocklReport ss = new StocklReport(). pi. bharatDataSetTableAdapters.radboree. ss.productinsert).radboree. bharatDataSet yy = new bharatDataSet().Checked && this.bharatDataSetTableAdapters.Checked) { bharatDataSet yy = new bharatDataSet().productinsertTableAdapter(). StocklReport ss = new StocklReport().productinsertTableAdapter().SetDataSource(yy). } } private void radboree_CheckedChanged(object sender.SelectionFormula = "{productinsert. ss.bharatDataSetTableAdapters.Date.bore}>0".classification}='Acessories'".ToShortDateString().SelectionFormula = "{productinsert.productinsert). pi.Fill(yy.Fill(yy.Checked) { bharatDataSet yy = new bharatDataSet(). StocklReport ss = new StocklReport(). } if (this.ReportSource = ss. ss. ss.SelectionFormula = "{productinsert.ReportSource = ss. .SetDataSource(yy).productinsertTableAdapter pi = new Bharat_Gun_House.ToShortDateString(). crystalReportViewer1.Fill(yy.SetDataSource(yy).productinsertTableAdapter(). crystalReportViewer1.Value.Checked) { bharatDataSet yy = new bharatDataSet().productinsertTableAdapter pi = new Bharat_Gun_House.Fill(yy.productinsert).gunname}='Rifle' and {productinsert.chriflee.bore}>0".SelectionFormula = "{productinsert. } if (this.productinsert). pi. EventArgs e) { String strr1 = this. EventArgs e) { if (this. crystalReportViewer1.ReportSource = ss.bharatDataSetTableAdapters.

cmbclassification. db.Items.Items.dr.dr["itt"]).dr.Add(db.com.CommandText = "select distinct location as ty from productinsert".Close(). } } } using using using using using using using System.Add(db.Close().cmbcompany. System.purchasedate}<='" + strr + "'". EventArgs e) { db.com. while (db.dr["it"]).dr.dr.Read()) this. System.Add(db. db. namespace Bharat_Gun_House { public partial class CRViewerPurchase : Form { public CRViewerPurchase() { InitializeComponent().SelectionFormula = "{productinsert.Close().Read()) this.Windows.Close(). db.cmblocation.dr = db.CommandText = "select distinct sname as ty from datapurchase".dr["ty"]).crystalReportViewer1. db.ExecuteReader(). db.CommandText = "select distinct company as ty from productinsert".dr.ExecuteReader().dr.dr = db. db. while (db. db. while (db. db.Read()) this.Close(). db.ExecuteReader().Items. db.dr["ty"]). while (db.com.purchasedate}>= '" + strr1 + "' and {productinsert.dr.cmbtype. sql1 = "Select * from datapurchase where BillID>0 ".Drawing. while (db.dr = db.cmbname.ExecuteReader().dr = db.Items.dr = db. System.com.Generic.Add(db.Close().dr["ty"]).com. . db.CommandText = "select distinct itemname as itt from subitem". db.com. bool firsttime = true.Items.Text. while (db. while (db.dr["ty"]).Read()) this.dr. db.Forms.dr.com.dr.Items. db. db.dr = db.com.dr.dr = db. System.dr.dr.ExecuteReader(). db.Items.com. db.com.com. private void CRViewerPurchase_Load(object sender.com.CommandText = "select distinct type as ty from productinsert". System.cmbbore.dr["bb"]).com.CommandText = "select distinct bore as bb from productinsert".Read()) this.dr.Collections.Add(db.ComponentModel. } string sql1.Read()) this. db. System.ExecuteReader().ExecuteReader(). db.Read()) this.Add(db.CommandText = "select distinct itemname as it from items".Close().Add(db. db.com.cmbproductname.Data.

ExecuteScalar()).dr.ExecuteReader().dr["armsno"].Substring(pos + len).dr["received"]).DailyPurchase).CommandText = "Select Min(BillDate) from datapurchase".ToInt32(db. dailyPurchaseTableAdapter.com. bharatDataSet.dr["purchaseprice"]). da.TotalAmount = Convert. crystalReportViewer1. db.dr[13].bore = Convert.purchaseprice = Convert. da. this.Substring(0. } return query.ExecuteNonQuery(). da.Rows.dr["subitemsid"]). return s1 + s2.ToString().dr.ToInt32(db. pr.Payable = Convert. private void cmbclassification_SelectedIndexChanged(object sender. int i = db.marketprice = Convert.Length. this.dr["TotalAmount"]).subitemsid = Convert. dd.SelectedIndex = 0. da. PurchaseReport pr = new PurchaseReport().dr["BillID"]).com. /*db. da.ToInt32(db.dr["Billno"].saddress = db. da. da. firsttime = false.DailyPurchase). da.lincenceno = db. } String classif = "and Classificatino Like '%'".dr = db.dr["payable"]).ToString().RefreshReport().ToString().SelectedIndex = 0.ReportSource = pr.DailyPurchaseRow da = bharatDataSet.1).ToInt32(db.dr["Qty"]).DailyPurchase.datetime1.dr["location"].cmbclassification.Fill(bh. } db.armsno = db.cmbbore.ToString().ToString().AddDays(this.dr["gunname"].com.classification = db.com.DailyPurchaseTableAdapter dd = new Bharat_Gun_House. da.Close(). pos). da.dr["Lodertype"].dr["validdate"]. bharatDataSet bh = new bharatDataSet(). da. da.CommandText = sql1.ToDecimal(db. this. if (pos >= 0 && len > 0) { String s1 = query.ToString().ToInt32(db. da.BillDate = db.SelectedIndex = 0.Received = Convert.ToString().type = db. da.cmbtype.*/ display().dueAmount = Convert.DailyPurchaseTableAdapter().com.Billno = db.IndexOf(remove).Read()) { bharatDataSet.ToInt32(db.com.sname = db.qty = Convert. da. bharatDataSetTableAdapters.ToString().cmbproductname.ToDateTime(db. this. da.dr["marketprice"]).dr["dueamount"]).cmbname. da. EventArgs e) . da.Value = Convert. this. da.NewDailyPurchaseRow().bharatDataSetTableAdapters. } void display() { db.dr["company"]. da.gunname = db.dr[8].dr["sname"].ToInt32(db.dr["bore"]).location = db.crystalReportViewer1.cmblocation. while (db. da. this.SelectedIndex = 0.ToString().ToString(). String s2 = query.SelectedIndex = 0.DailyPurchase.dr["BillDate"].ToInt32(db.company = db.dr["type"]. String remove) { int pos = query.SetDataSource(bh).ToString().cmbcompany.Add(da). int len = remove. da.validdate = db.SelectedIndex = 0. } String GetQueryString(String query.dr["saddress"].SelectedIndex = 0. this.BillID = Convert.ToInt32(db. this.CommandText = "Delete from DailyPurchase".Lodertype=db.ToString().ToString(). db.Update(bharatDataSet. da.

if (this. if (this. if (this. loc). classif). display(). loc = "and Location like '%'".cmbcompany. prodname = "and GunName='" + this.SelectedItem. private void cmbbore_SelectedIndexChanged(object sender. EventArgs e) { if (firsttime) return. prodname).ToString() + "'". } sql1 = sql1 + loc. } String company = "and company Like '%'".ToString() == "All") { . company). } String loc = "and Location Like '%'".SelectedItem.cmbproductname.SelectedItem.if (firsttime) return. prodname). } else { sql1 = GetQueryString(sql1. company = "and company like '%'".ToString() == "All") { sql1 = GetQueryString(sql1.cmbbore.SelectedItem. private void cmblocation_SelectedIndexChanged(object sender. } sql1 = sql1 + prodname. } else { sql1 = GetQueryString(sql1. display(). classif = "and Classificatino like '%'". EventArgs e) { if (firsttime) return. loc).ToString() + "'".SelectedItem. company). EventArgs e) { if (firsttime) return. private void cmbproductname_SelectedIndexChanged(object sender.cmbproductname. display(). private void cmbcompany_SelectedIndexChanged(object sender.cmbclassification. } sql1 = sql1 + company. display(). company = "and company='" + this.cmbcompany. prodname = "and GunName like '%'".SelectedItem.cmbclassification.ToString() == "All") { sql1 = GetQueryString(sql1.ToString() + "'".ToString() == "All") { sql1 = GetQueryString(sql1. classif). if (this.ToString() == "All") { sql1 = GetQueryString(sql1. } String prodname = "and GunName Like '%'".SelectedItem. classif = "and Classificatino='" + this. } String bore = "and Bore Like '%'".SelectedItem. loc = "and Location='" + this. if (this. } sql1 = sql1 + classif.cmblocation.ToString() + "'". } else { sql1 = GetQueryString(sql1.cmblocation. EventArgs e) { if (firsttime) return. } else { sql1 = GetQueryString(sql1.SelectedItem.

} String sname = "and sname Like '%'".SelectedItem. System. bore). sname). namespace Bharat_Gun_House { public partial class Frmsalereport : Form { . bore = "and Bore like '%'". if (this. } else { sql1 = GetQueryString(sql1. EventArgs e) { if (firsttime) return. EventArgs e) { if (firsttime) return.SelectedItem. } String type = "and type Like '%'". private void datetime1_CloseUp(object sender. System. type = "and type='" + this.ToString() == "All") { sql1 = GetQueryString(sql1. display().Drawing.ToString() == "All") { sql1 = GetQueryString(sql1. bore). type = "and type like '%'". sname = "and sname='" + this. sql1 = GetQueryString(sql1. type).{ } else { sql1 = GetQueryString(sql1. System. } sql1 = sql1 + sname.ToString() + "'".cmbname. } sql1 = sql1 + bore.cmbtype. bdate). sql1 = GetQueryString(sql1.ComponentModel. if (this.Windows. } String bdate = " and BillDate Like '%'". private void cmbname_SelectedIndexChanged(object sender. display().Forms.Text. } } } "'". sname).Data. EventArgs e) { if (firsttime) return. bore = "and Bore='" + this. bdate = "and BillDate='" + this.cmbbore.Date.Collections.datetime1.SelectedItem.SelectedItem. type). private void cmbtype_SelectedIndexChanged(object sender.cmbname. display(). } sql1 = sql1 + type.Value.ToString() + "'". } else { sql1 = GetQueryString(sql1. display(). using using using using using using using System. System.cmbtype. System.ToShortDateString() + sql1 = sql1 + bdate. System. sname = "and sname like '%'".Generic.SelectedItem.ToString() + "'".

ExecuteReader().cmbclassification. } db.Items.CommandText = "select distinct type as ty from datasale". db.cmbarmsno.com.CommandText = "select distinct gunname as gu from datasale".Read()) { if (db.dr["gu"]).dr.com. } db.SelectedIndex = 0.CommandText = "select distinct classification as cl from datasale".Items. this.dr. private void Frmsalereport_Load(object sender.dr["cl"]!="") this.Items.com.ToDateTime(db. db.ExecuteReader().public Frmsalereport() { InitializeComponent(). EventArgs e) { // TODO: This line of code loads data into the 'bharatDataSet.dr = db. } db.com.Close().dr.Read()) { if (db. this.CommandText = "select distinct bore as br from datasale".com. /*db.dr = db.dr = db. db. You can move.dr["ar"]).ExecuteNonQuery().SelectedIndex = 0.dr. while (db. .cmbproductname.dr["ty"] != "") this.Value = Convert. db.*/ this.Add(db.dr["br"] != "") this.Add(db. this.dr.ExecuteReader(). as needed.Close(). } void display() { db. this.Read()) { if (db.dr["br"]). } bool firsttime = true. while (db. db. msql1 = "select * from datasale where qty>0".dataviewTableAdapter. while (db.com. firsttime = false.com.ExecuteReader().dr. } db.cmbbore.ExecuteReader().CommandText = "Select Min(saleDate) from datasale".Add(db.com.dataview). db.SelectedIndex = 0.dr["cm"]).Add(db.cmbarmsno.dr["ar"] != "") this.Read()) { if (db.CommandText = "select distinct company as cm from datasale". db.CommandText = msql1.com.com.CommandText = "Delete from dataview".SelectedIndex = 0. } db.CommandText = "select distinct armsno as ar from datasale".dr["cl"]).Close().cmbcompany.Items.dataview' table.ExecuteScalar()).dr = db.com.Items.dr.Close().SelectedIndex = 0.dr["ty"]).cmbtype.dr.dr.cmbtype. this.cmbclassification.com. db.Add(db.cmbbore.Read()) { if (db.AddDays(-1).com. this.Add(db. db. or remove it.dr["cm"] != "") this.com.Close().Close(). this.Read()) { if (db. db.com. db.dr = db. db.dr.dr. } db. string msql1.cmbcompany.dr["gu"] != "") this.SelectedIndex = 0.com.dr = db.dr.bharatDataSet. db.ExecuteReader(). display(). db.Fill(this.cmbproductname.date1.Items. while (db. while (db. while (db.com.

bharatDataSetTableAdapters. classif).dataviewRow row = bharatDataSet. if (this. } String classif = "and Classification Like '%'".ReportSource = sa.ToDecimal(db.dr["saledate"].dr["gunname"].dr["validupto"].dr["payable"]). row. row. if (pos >= 0 && len > 0) { String s1 = query. } msql1 = msql1 + pro. } else { msql1 = GetQueryString(msql1. row.purchaseprice = Convert.type = db.com.caddress = db. row.ToInt32(db. private void cmbproductname_SelectedIndexChanged(object sender.dataview).validupto = db. return s1 + s2.dr["purchaseprice"]). String pro = "and gunname Like '%'". pos). row. row.dataviewTableAdapter cc = new Bharat_Gun_House. } db. String s2 = query.ToString()+"'".ToInt32(db. row.dr["caddress"].SelectedItem.Close().ToString().gunname = db.ToString().dataview). row.Rows. pro).Marketprie = Convert. row.ToInt32(db.ToString() == "All") { msql1 = GetQueryString(msql1.dr["type"]. DailySalesReport sa = new DailySalesReport().cname = db. row.ExecuteReader(). row. } else .dr["city"].dr = db. row. classif = "and Classification like '%'".Add(row).dr. row.dataview.ToString().ToString() == "All") { msql1 = GetQueryString(msql1.city = db.dr["bore"]).Length.cmbclassification.dataview.saledate = db.dr["due"]).payable = Convert.dr["licenceno"].Fill(bh. EventArgs e) { if (firsttime) return. display(). while (db.ToInt32(db. row.SetDataSource(bh).due = Convert.ToString(). String remove) { int pos = query. row.ToInt32(db.ToString(). sa. row.ToInt32(db.bharatDataSetTableAdapters. dataviewTableAdapter. crystalReportViewer1. pro = "and gunname like '%'". int len = remove.cmbproductname.dr["marketprie"]).Update(bharatDataSet.IndexOf(remove).ToString().dr["armsno"].ToString(). if (this.armsno = db.ToString().SelectedItem.Read()) { bharatDataSet.ToString(). } private void cmbclassification_SelectedIndexChanged(object sender.db.company = db. pro).dataviewTableAdapter().dr["cname"].ToString().ToString() .SelectedItem.ToString().qty = Convert. bharatDataSet bh = new bharatDataSet(). row.Substring(0. row.dr.dr["state"].NewdataviewRow().state = db.licenceno = db. bharatDataSet.received=Convert.dr["classification"].dr["company"]. pro="and gunname='"+this.cmbproductname. row.dr["qty"]). cc. } return query. } String GetQueryString(String query.Substring(pos + len).dr["received"]).bore = Convert. EventArgs e) { if (firsttime) return.classification = db.

company).cmbtype.ToString()=="All") { msql1=GetQueryString(msql1.SelectedItem. private void cmbtype_SelectedIndexChanged(object sender. if (this.cmbcompany. display(). company = "and company='" + this. bore).ToString() + "'". } String company = "and company like '%'".ToString() + "'". armsno = "and armsno like '%'". company = "and company like '%'".cmbtype.cmbbore. display().ToString() == "All") { msql1 = GetQueryString(msql1. if(this. armsno).cmbarmsno. if (this.SelectedItem. } String armsno = "and armsno like '%'".bore). } String bore = "and bore like '%'". EventArgs e) { if (firsttime) return.ToString() + "'".SelectedItem. private void cmbarmsno_SelectedIndexChanged(object sender. { . classif). if (this. type).SelectedItem. display(). } msql1 = msql1 + type. type = "and type='" + this.cmbcompany.ToString() == "All") { msql1 = GetQueryString(msql1. } else { msql1 = GetQueryString(msql1. armsno = "and armsno='"+this.msql1 = GetQueryString(msql1. armsno). } else { msql1 = GetQueryString(msql1. } msql1 = msql1 + classif. private void cmbcompany_SelectedIndexChanged(object sender. } msql1 = msql1 + armsno.cmbarmsno.SelectedItem. bore = "and bore='" + this.cmbbore.SelectedItem. } msql1 = msql1 + bore. display(). classif = "and Classification='" + this. type = "and type like '%'". bore = "and bore like '%'". } String type = "and type like '%'".ToString() + "'". } msql1 = msql1 + company.ToString() == "All") { msql1 = GetQueryString(msql1. company). } String bdate = "and saledate like '%'". EventArgs e) { if (firsttime) return.ToString()+"'". EventArgs e) { if (firsttime) return.SelectedItem. display(). } else { msql1 = GetQueryString(msql1. type). } else { msql1 = GetQueryString(msql1.SelectedItem.cmbclassification. private void cmbbore_SelectedIndexChanged(object sender.SelectedItem. EventArgs e) { if (firsttime) return.

} private void dateTimePicker1_ValueChanged(object sender.txtvalidup.Text + "'.com.com. } try { string str = DateTime.txtTranslino. db. } catch { sno1++.Close(). System. EventArgs e) { String strr1 = this.date1. } } } using using using using using using using System.saledate}<='" + strr + "'". msql1 = GetQueryString(msql1.Value.Now.txtto. sa.Value.'" + this. cc.Forms.Drawing.ExecuteNonQuery(). MessageBox.dataview).com.ToShortDateString() + "'".bharatDataSetTableAdapters. EventArgs e) { /*if (firsttime) return. System.ToShortDateString().Value.'" + this.ToShortDateString().ToInt32(db.dataviewTableAdapter().Text + "'. msql1 = msql1 + bdate.date1.txtagainst.saledate}>= '" + strr1 + "' and {dataview. crystalReportViewer1.Text + "'.'" + this. DailySalesReport sa = new DailySalesReport(). System.Date.'" + str + "')". db.Collections.txtfollowing. bharatDataSetTableAdapters.private void date1_ValueChanged(object sender.Fill(bh.Windows.'"+this.'" + this.Date. bharatDataSet bh = new bharatDataSet().dataviewTableAdapter cc = new Bharat_Gun_House.ToShortDateString().'" + this.Text.SetDataSource(bh). bdate).txtlicenceno. bdate = "and saleDate='" + this.Data.ReportSource = sa. System.ComponentModel.Text + "'.*/ } private void btnshowall_Click(object sender.Date. display(). EventArgs e) { try { db.date2. EventArgs e) { this. String strr = this.CommandText = "select max(sno) from policetable".ExecuteScalar()).CommandText = "insert into policetable values("+sno1+". crystalReportViewer1. } catch { } .Text + "'. } int sno1.Show("Record inserted"). sno1=Convert. System.SelectionFormula = "{dataview. sno1++.Generic.com. private void btnsave_Click(object sender.Text+"'. namespace Bharat_Gun_House { public partial class CRVPolicefrm : Form { public CRVPolicefrm() { InitializeComponent(). System.

Focus(). } private void txtvalidup_KeyDown(object sender.Focus().txtfollowing. KeyEventArgs e) { if (e. this.lbljourny.Visible = true.txtTranslino.Text = "".txtfollowing.txtlicenceno. } private void txtlicenceno_KeyDown(object sender.txtto. EventArgs e) { this. this.txtagainst.Text = "". KeyEventArgs e) { if (e.Focus().txtagainst.Text = "". KeyEventArgs e) { if (e.Enter) this. this.txtvalidup.Visible = true. .KeyCode == Keys.Enabled = true.txtto. } private void txtagainst_KeyDown(object sender. this.txtvalidup. } private void txtto_KeyDown(object sender. } private void CRVPolicefrm_Load(object sender. KeyEventArgs e) { if (e.Text = "".Enter) this. this.KeyCode == Keys.txtagainst. EventArgs e) { this.KeyCode == Keys.Text = "". EventArgs e) { this.Text = "". } private void radjourny_CheckedChanged(object sender. KeyEventArgs e) { if (e.Enabled = true. this. } private void radtransport_CheckedChanged(object sender.txtlicenceno. this.txtTranslino. policevierw ob = new policevierw().Visible = true.txtto.Close(). } private void txtfollowing_KeyDown(object sender. } private void button3_Click(object sender.txtlicenceno.} private void button2_Click(object sender.Text = "".btnsave.lbltransport.Visible = true.Enter) this. this.Text = "".Text = "". ob. KeyEventArgs e) { } private void txttotal_KeyDown(object sender. EventArgs e) { this.txtlicenceno.Focus().KeyCode == Keys.KeyCode == Keys. this. EventArgs e) { this. this.Text = "".lbljourny.txtvalidup.Enter) this. this. this.lbltransport.Text = "".Show(). this.Enter) this.Focus().

txtTranslino.this.lbljourny.txtTranslino.Visible = false.Visible = false. this.Visible = false.Enabled = true.txtlicenceno.lbltransport. this. } } } .txtlicenceno.Visible = false.Enabled = true. this. this. this.

while (db.Text.ReportSource = rpt.Data. } private void cmbname_SelectedIndexChanged(object sender. db.Read()) { this.dr.SetDataSource(bh).Fill(bh.Add(db. System. bharatDataSetTableAdapters. System. bharatDataSetTableAdapters.Windows.SelectionFormula = "{policetable.repairTableAdapter da = new Bharat_Gun_House.policetable). namespace Bharat_Gun_House { public partial class FrmRepairReport : Form { public FrmRepairReport() { InitializeComponent().Fill(bh. namespace Bharat_Gun_House { public partial class policevierw : Form { public policevierw() { InitializeComponent(). da. } } } using using using using using using using System. crystalReportViewer1.ToShortDateString() + "'". rpt.Now.dr = db.Generic.dailydate}='" +DateTime.com.Data. System. bharatDataSet bh = new bharatDataSet().policetableTableAdapter(). System. System. } private void policevierw_Load(object sender. System. crystalReportViewer1.dr["pa"]). System. System. da.Windows.Text.Items.Forms. du. EventArgs e) { db.using using using using using using using System.Drawing.Close(). System.ReportSource = du.bharatDataSetTableAdapters.ExecuteReader().repair). } private void FrmRepairReport_Load(object sender. System.CommandText = "select distinct party as pa from repair".com.repairTableAdapter().ComponentModel.Generic.dr. CRdailyPoliceReport rpt = new CRdailyPoliceReport().Forms.Drawing. System. EventArgs e) . } db.SetDataSource(bh). EventArgs e) { bharatDataSet bh = new bharatDataSet().Collections.ComponentModel.policetableTableAdapter da = new Bharat_Gun_House. CRVRepairDues du = new CRVRepairDues().Collections.cmbname. crystalReportViewer1. System.bharatDataSetTableAdapters.

dr = db.rpdues = this.SetDataSource(bh).ReportSource = du.ReportSource = du. da. System. } private void FrmCheckDues_Load(object sender. da.rdate}='" + this.repairTableAdapter da = new Bharat_Gun_House.Drawing.ReportSource = du. crystalReportViewer1. du. } { } } using using using using using using using System.Forms.ComponentModel.Text.repairTableAdapter da = new Bharat_Gun_House.repairTableAdapter(). crystalReportViewer1. crystalReportViewer1.Data.SetDataSource(bh). fr.Fill(bh.ExecuteReader(). CRVRepairDues du = new CRVRepairDues(). } private void lnkdues_LinkClicked(object sender.cmbname. crystalReportViewer1.repairTableAdapter da = new Bharat_Gun_House. } private void btnshowall_Click(object sender. System.repair).Show().SetDataSource(bh). CRVRepairDues du = new CRVRepairDues(). System.CommandText = "select distinct party as pa from repairdues".repairTableAdapter(). crystalReportViewer1. .com. CRVRepairDues du = new CRVRepairDues(). } private void dateTimePicker1_ValueChanged(object sender.SelectionFormula = "{repair.repair). EventArgs e) { bharatDataSet bh = new bharatDataSet().cmbname.ToShortDateString() + "'".repair). du.dateTimePicker1. bharatDataSetTableAdapters. System.Date. bharatDataSetTableAdapters. System.bharatDataSetTableAdapters. LinkLabelLinkClickedEventArgs e) { db. this.bharatDataSetTableAdapters.Fill(bh.Value.SelectionFormula = "{repair.Text+"'".repairTableAdapter().Text.Fill(bh. System. EventArgs e) { db.bharatDataSetTableAdapters. namespace Bharat_Gun_House { public partial class FrmCheckDues : Form { public FrmCheckDues() { InitializeComponent().party}='"+this. bharatDataSetTableAdapters.Generic.bharatDataSet bh = new bharatDataSet(). da.Collections. du.Close(). EventArgs e) { bharatDataSet bh = new bharatDataSet().Windows. db.com. FrmrepairDues1 fr = new FrmrepairDues1().

} private void cmbname_SelectedIndexChanged(object sender. bharatDataSetTableAdapters.SelectionFormula = "{repairdues.repairdues). crystalReportViewer1.Close(). bharatDataSet bh = new bharatDataSet().repairduesTableAdapter(). EventArgs e) { bharatDataSet bh = new bharatDataSet().bharatDataSetTableAdapters.Collections. } private void btnshow_Click(object sender.ReportSource = ch.Fill(bh.Read()) { this.ReportSource = ch.repairduesTableAdapter(). da. CRVcheckduesreturns ch = new CRVcheckduesreturns().Fill(bh. da.repairduesTableAdapter().repairduesTableAdapter da = new Bharat_Gun_House. crystalReportViewer1.Fill(bh.Text.Items.Text+"'". } private void datetimep_ValueChanged(object sender.Fill(bh.repairduesTableAdapter(). CRVcheckduesreturns ch = new CRVcheckduesreturns(). } db.ComponentModel. ch. EventArgs e) { bharatDataSet bh = new bharatDataSet(). System. CRVcheckduesreturns ch = new CRVcheckduesreturns(). System.dr["pa"]).party}='"+this.Windows. crystalReportViewer1. ch. crystalReportViewer1.repairduesTableAdapter da = new Bharat_Gun_House.dr.SetDataSource(bh). bharatDataSetTableAdapters.repairdues). EventArgs e) { bharatDataSet bh = new bharatDataSet().Forms.Value. } } } using using using using using using using System. .cmbname. CRVcheckduesreturns ch = new CRVcheckduesreturns().ReportSource = ch.repairduesTableAdapter da = new Bharat_Gun_House. crystalReportViewer1. ch. da.cmbname.repairdues).SelectionFormula = "{repairdues.Generic. System.Add(db.ReportSource = ch.ToShortDateString()+"'".Data.dr. bharatDataSetTableAdapters. System.SetDataSource(bh).SetDataSource(bh). ch.bharatDataSetTableAdapters. bharatDataSetTableAdapters.while (db. da.rdate}='"+this.repairduesTableAdapter da = new Bharat_Gun_House.bharatDataSetTableAdapters.datetimep. System.Drawing. System. crystalReportViewer1.bharatDataSetTableAdapters.repairdues). namespace Bharat_Gun_House { public partial class FrmReturnrep : Form { public FrmReturnrep() { InitializeComponent().Date.SetDataSource(bh).

ConReturn). ConsinReturnReport cr = new ConsinReturnReport().Read()) { if (db. ret. ConsinReturnReport cr = new ConsinReturnReport().ConReturn).Close(). ret.Fill(bh. bharatDataSetTableAdapters. cr. db. db. EventArgs e) { bharatDataSet bh = new bharatDataSet().dr["par"].com. crystalReportViewer1.Fill(bh.bharatDataSetTableAdapters.ConReturnTableAdapter(). ret. } private void dateTimePicker1_ValueChanged(object sender.Add(db.ToString()).bharatDataSetTableAdapters.cmbparty.CommandText = "select distinct gunname as pr from conreturn". db.SetDataSource(bh). EventArgs e) { bharatDataSet bh = new bharatDataSet().Items.SelectionFormula = "{Conreturn.bharatDataSetTableAdapters.dr. } private void cmbparty_SelectedIndexChanged(object sender. db.ReportSource = cr.party}='" + this.dr["pr"] != "") { this.Date.ConReturn). bharatDataSetTableAdapters. EventArgs e) { bharatDataSet bh = new bharatDataSet().ConReturn).Close(). bharatDataSetTableAdapters.ConReturnTableAdapter().dr["pr"]. crystalReportViewer1.ConReturnTableAdapter().SelectionFormula = "{Conreturn. crystalReportViewer1. cr.Read()) { if (db.ConReturnTableAdapter ret = new Bharat_Gun_House.Add(db.com. bharatDataSetTableAdapters.SelectionFormula = "{Conreturn.Items.dr = db.dateTimePicker1.ReportSource = cr.cmbproductname.ConReturnTableAdapter ret = new Bharat_Gun_House.ConReturnTableAdapter(). } private void btnshowall_Click(object sender.bharatDataSetTableAdapters.ExecuteReader().dr. bharatDataSetTableAdapters.cmbparty. } } db.dr = db.ToString()). while(db. ConsinReturnReport cr = new ConsinReturnReport(). EventArgs e) { bharatDataSet bh = new bharatDataSet().com.Text + "'". crystalReportViewer1. while (db.ReportSource = cr. cr. crystalReportViewer1.ConReturnTableAdapter().cmbproductname. cr.Value.Text + "'".ReportSource = cr.ConReturnTableAdapter ret = new Bharat_Gun_House. crystalReportViewer1.ConReturn).dr["par"] != "") this.SetDataSource(bh).} private void FrmReturnrep_Load(object sender. EventArgs e) { bharatDataSet bh = new bharatDataSet(). ConsinReturnReport cr = new ConsinReturnReport().CommandText = "select distinct party as par from conreturn".ConReturnTableAdapter ret = new Bharat_Gun_House. .bharatDataSetTableAdapters.ExecuteReader(). ret.com.Fill(bh.ToShortDateString() + "'".Fill(bh.Fill(bh.dr.SetDataSource(bh). } private void cmbproductname_SelectedIndexChanged(object sender.returndate}='" + this. ret. crystalReportViewer1.gunname}='" + this.ConReturnTableAdapter ret = new Bharat_Gun_House.SetDataSource(bh). } db.dr.

Read()) { this. db. while (db.dr = db.Items. cr. using using using using using using using System. .dr.Add(db.cmbtype. bool first=true. System. EventArgs e) { db.Add(db.Text.Close(). db.com.com.ExecuteReader(). System. profit. namespace Bharat_Gun_House { public partial class FrmAccount1 : Form { public FrmAccount1() { InitializeComponent(). while (db.Add(db.com.Items.Read()) { this. System. } db.CommandText = "select distinct gunname as cl from datasale".Read()) { this. db. System.dr.Data.cmbbore. while (db.com.dr["cl"]).dr.com.ExecuteReader().CommandText = "select distinct classification as cl from datasale".CommandText = "select distinct lodertype as cl from datasale".Forms.Add(db.CommandText = "select distinct type as cl from datasale".Windows.dr["cl"]).Items.dr. System.ExecuteReader().ExecuteReader().SetDataSource(bh). } db.com.dr["cl"]).Items.com. private void FrmAccount1_Load(object sender. System. } db.cmbpname.ComponentModel. } int loss.dr. db.CommandText = "select distinct bore as cl from datasale".dr = db.Generic.Read()) { this.dr = db. String msql.Read()) { this.dr = db.dr.Close().dr.dr["cl"]).dr["cl"]).Items. } db. db.com. while (db.CommandText = "select distinct company as cl from datasale". while (db. db.Add(db.dr.dr.com.Items. crystalReportViewer1. db.Close(). } db.Collections.Read()) { this.ReportSource = cr. db.dr = db. db. nolspro = 0. db.com.Drawing.ExecuteReader().ExecuteReader().cmblodertype.com.Close().dr.Close().dr = db. while (db.cmbclass. db.dr["cl"]).} } } ConsinReturnReport cr = new ConsinReturnReport().Add(db.cmbcompany.dr.com.

SelectedIndex = 0.LossProfit. } return query.SelectedIndex = 0. rw.ToInt32(db.ToInt32(db. this.armsno = db.ToInt32(db. rw.SelectedIndex = 0.Rows. rw. } catch { } bharatDataSet bh = new bharatDataSet(). .SetDataSource(bh).ToInt32(db.SelectedIndex = 0.company = db. showdata().cmblodertype. lossProfitTableAdapter.ExecuteNonQuery().saledate = db.dr["marketprie"]). CRVAccountReport ac = new CRVAccountReport().dr["gunname"].dr["marketprie"]) < Convert.ToInt32(db.com. String s2 = query.com.dr = db.equal = nolspro. String remove) { int pos = query.Substring(0. this.Close().Profit = profit.Close().dr["armsno"].dr["classification"].dr["marketprie"]) > Convert. db. msql = "select * from datasale where qty>0". rw.dr["purchaseprice"])) { profit = Convert.} db.com.ToString(). } else { rw.LossProfitTableAdapter da = new Bharat_Gun_House. rw.ExecuteReader().ToString().dr["bore"]). bharatDataSetTableAdapters. db.ToString().ToString().LossProfit).dr["purchaseprice"]). } bharatDataSet.CommandText = msql. rw.Marketprie = Convert.ToString(). } else if (Convert. rw.ToInt32(db.dr["purchaseprice"]) Convert.ToString().cmbpname. if (Convert. ac. .gunname = db.dr.payable = Convert.cmbbore. rw.dr["purchaseprice"])) { loss = Convert.Fill(bh.LossProfitTableAdapter().ToInt32(db.ToInt32(db.ToDecimal(db.classification = db. pos). rw.type = db.IndexOf(remove). this.SelectedIndex = 0.NewLossProfitRow().Substring(pos + len). rw.dr["payable"]).dr["marketprie"]) Convert.dr["lodertype"].Read()) { bharatDataSet.ToInt32(db. } String GetQueryString(String query. this.LossProfit. int len = remove.ToInt32(db. } db. if (pos >= 0 && len > 0) { String s1 = query. rw. da.Update(bharatDataSet. rw.ToInt32(db. } void showdata() { try { db.SelectedIndex = 0.dr["type"]. rw.cmbclass.LossProfit).dr["saledate"].cmbtype.cmbcompany.dr. first = false.dr["company"].Loss = loss. db. this.CommandText = "delete from lossProfit".dr["purchaseprice"]).dr.com. this.Length.purchaseprice = Convert.bore = Convert.LossProfitRow rw = bharatDataSet.Lodertype = db.dr["marketprie"]).Add(rw).bharatDataSetTableAdapters. while (db.ToString(). return s1 + s2.

} msql=msql+bo. bo=" and bore like '%'". if (this. showdata().cmbclass. EventArgs e) { if (first) return.SelectedItem == "All") { msql = GetQueryString(msql.ReportSource = ac.gun).Text+"".cmbbore. ty = "and type like '%'". } else { msql = GetQueryString(msql.} crystalReportViewer1.SelectedItem == "All") { msql=GetQueryString(msql. date1 = "and saledate like'%'". String String String String String bo = "and bore like '%'". } String gun = "and gunname like '%'". bo=" and bore="+this. } msql = msql + classi. co = "and company like '%'". classi="and classification='"+this. showdata(). EventArgs e) { if (first) return.cmbpname. if (this.Text + "'". } private void cmbbore_SelectedIndexChanged(object sender. } private void cmbtype_SelectedIndexChanged(object sender. } else { msql = GetQueryString(msql. } else { msql = GetQueryString(msql.Text+"'". classi = "and classification like '%'". classi). gun=" and gunname like '%'".SelectedItem == "All") { msql = GetQueryString(msql. if (this.cmbtype.bo). gun=" and gunname='"+this. ty = " and type like '%'". loder = "and lodertype like '%'".SelectedItem == "All") { msql=GetQueryString(msql.cmbbore. .cmbclass. ty = " and type='" + this. } msql = msql + ty. gun).Text+"'". classi). private void cmbpname_SelectedIndexChanged(object sender. ty). private void cmbclass_SelectedIndexChanged(object sender. showdata(). } else { msql = GetQueryString(msql. String classi = "and classification like '%'". bo). } msql=msql+gun. EventArgs e) { if (first) return. if (this. EventArgs e) { if (first) return.cmbtype.cmbpname. ty).

EventArgs e) { if (first) return. loder). EventArgs e) { if (first) return.LossProfitTableAdapter(). EventArgs e) { if (first) return. msql = GetQueryString(msql.ComponentModel. da. if (this. } private void cmbcompany_SelectedIndexChanged(object sender.} showdata().cmbcompany. System.cmbcompany. crystalReportViewer1. co).Data.bharatDataSetTableAdapters. System.SelectedItem == "All") { msql = GetQueryString(msql. .Date. bharatDataSetTableAdapters. } } } "'". EventArgs e) { msql = "select * from datasale where qty>0". System. bharatDataSet bh = new bharatDataSet(). private void cmblodertype_SelectedIndexChanged(object sender. CRVAccountReport ac = new CRVAccountReport().Fill(bh. date1).Value. } private void btnshowall_Click(object sender.Drawing. loder = " and lodertype like '%'". using using using using using System.LossProfit). ac. } else { msql = GetQueryString(msql. } else { msql = GetQueryString(msql.SetDataSource(bh). showdata().cmblodertype. showdata().Text + "'".ReportSource = ac.Collections. date1 = " and saledate='" + this. loder).Text + "'". loder = " and lodertype='" + this. } private void datetimep_ValueChanged(object sender. } msql = msql + loder. System. } msql = msql + co. if (this. showdata(). co = " and company like '%'".cmblodertype. co = " and company='" + this.datetimep.ToShortDateString() + msql = msql + date1. showdata(). co).Generic.SelectedItem == "All") { msql = GetQueryString(msql.LossProfitTableAdapter da = new Bharat_Gun_House.

crystalReportViewer1.cmbpartyname. namespace Bharat_Gun_House . } private void FrmPartyDueReport_Load(object sender. } private void cmbpartyname_SelectedIndexChanged(object sender.Windows. System. System.Close().dr.com. EventArgs e) { db.cname}='"+this. crystalReportViewer1.SelectedIndex = 0.Data. cr.Add(db.Forms.Read()) { this.datasaleTableAdapter(). while (db.Items. System.cmbpartyname. da.cmbpartyname.SetDataSource(bh).Windows. this. bharatDataSetTableAdapters. } private void linkLabel1_LinkClicked(object sender.ReportSource = cr.using System. System.datasale).com.dr.Generic.Fill(bh.ComponentModel. } db. da. du. System.Collections. EventArgs e) { bharatDataSet bh = new bharatDataSet(). using System. LinkLabelLinkClickedEventArgs e) { FrmSubmitDues du = new FrmSubmitDues().datasaleTableAdapter().Text.datasaleTableAdapter da = new Bharat_Gun_House.datasaleTableAdapter da = new Bharat_Gun_House.dr = db.ExecuteReader(). namespace Bharat_Gun_House { public partial class FrmPartyDueReport : Form { public FrmPartyDueReport() { InitializeComponent().Drawing.Text. CrPartyDues cr = new CrPartyDues().ReportSource = cr. db.SelectionFormula = "{datasale. CrPartyDues cr = new CrPartyDues(). } private void btnshowall_Click(object sender.dr["na"]). System.bharatDataSetTableAdapters. bharatDataSetTableAdapters.Text+"'". cr. } } } using using using using using using using System.datasale).CommandText = "select distinct cname as na from datasale". EventArgs e) { this. crystalReportViewer1.SetDataSource(bh).Forms.Show().Fill(bh. bharatDataSet bh = new bharatDataSet().bharatDataSetTableAdapters.Close().

SelectionFormula = "{datapurchase.sname}='"+this. du.dataPurchaseTableAdapter().ReportSource = du.dr.CommandText = "select distinct sname as sn from datapurchase".dataPurchaseTableAdapter(). } private void lnkdues_LinkClicked(object sender.Fill(bh.Close().dataPurchaseTableAdapter da = new Bharat_Gun_House.Add(db.ExecuteReader().dr["sn"]).Fill(bh.cmbsname. da.cmbsname.Items.dataPurchase). du.Text.com. crystalReportViewer1. while (db.Text+"'".dr. FrmReturnBharatDues du = new FrmReturnBharatDues(). du. da. da.bharatDataSetTableAdapters.SetDataSource(bh). bharatDataSetTableAdapters. } private void FrmBharatDues_Load(object sender.dataPurchaseTableAdapter().dr = db.bharatDataSetTableAdapters. CRVDuesBharat du = new CRVDuesBharat(). bharatDataSet bh = new bharatDataSet().ReportSource = du. LinkLabelLinkClickedEventArgs e) { db.bharatDataSetTableAdapters. } } } . EventArgs e) { bharatDataSet bh = new bharatDataSet(). db.bhdues = this. CRVDuesBharat du = new CRVDuesBharat().SetDataSource(bh). EventArgs e) { db.dataPurchaseTableAdapter da = new Bharat_Gun_House. crystalReportViewer1.Show().Read()) { this.ReportSource = du. } private void btnshowall_Click(object sender.dataPurchaseTableAdapter da = new Bharat_Gun_House.{ public partial class FrmBharatDues : Form { public FrmBharatDues() { InitializeComponent().dataPurchase). crystalReportViewer1. bharatDataSetTableAdapters.Close(). CRVDuesBharat du = new CRVDuesBharat(). du. } private void cmbsname_SelectedIndexChanged(object sender. } db.SetDataSource(bh).com. bharatDataSetTableAdapters. this.dataPurchase).Fill(bh. EventArgs e) { bharatDataSet bh = new bharatDataSet(). crystalReportViewer1.cmbsname.