Friday, August 10, 2018

how to create registration wizard in any website | CAF | Sradha Webcreations

how to create registration wizard in any website 
Design Common Application Form (CAF) for any website 
(ASP.NET + SQL SERVER)

EMPLOYEE INFORMATION WIZARD Or CAF

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Wizard_employee.aspx.cs" Inherits="Wizard_employee" %>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<body style="font-weight: 700">
    <form id="form1" runat="server">
    <div>
   
        <asp:Wizard ID="Wizard1" runat="server" ActiveStepIndex="3" Height="443px"
            Width="881px">
            <WizardSteps>
                <asp:WizardStep ID="EmployeeInformation" runat="server" title="Step 1">
                    <table class="style1">
                        <tr>
                            <td colspan="2">
                                <strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Employee Information</strong></td>
                        </tr>
                        <tr>
                            <td class="style2">
                                &nbsp;</td>
                            <td>
                                &nbsp;</td>
                        </tr>
                        <tr>
                            <td class="style2">
                                Name</td>
                            <td>
                            <asp:TextBox ID="TextBoxNAME" runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td class="style2">
                                Designation</td>
                            <td>
                       <asp:TextBox ID="TextBoxDESIGNATION" runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td class="style2">
                                Remunaretion</td>
                            <td>
                    <asp:TextBox ID="TextBoxREMUNARETION" runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td class="style2">
                                Qualification</td>                            <asp:TextBox ID="TextBoxQUALIFICATION" runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td class="style2">
                                Reg by</td>
                            <td>
                     <asp:TextBox ID="TextBoxREG_BY" runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td class="style2">
                                Date Of Birth</td>
                            <td>
                     <asp:TextBox ID="TextBoxDOB" runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td class="style2">
           Joining Date</td>                             <asp:TextBox ID="TextBoxJOINDATE" runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td class="style2">
                                Now Posting</td>
                            <td>
                     <asp:TextBox ID="TextBoxNOWPOSTING" runat="server"></asp:TextBox>
            
               </td>
                        </tr>
                        <tr>
                            <td class="style2">
                                &nbsp;</td>
                            <td>
                                &nbsp;</td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                &nbsp;</td>
                        </tr>
                    </table>
                </asp:WizardStep>
                <asp:WizardStep ID="LeaveStatus" runat="server" title="Step 2">
                    <table class="style1">
                        <tr>
                            <td colspan="2">
                          </tr>
                        <tr>
                            <td class="style3">
                                &nbsp;</td>
                            <td>
                                &nbsp;</td>
                        </tr>
                        <tr>
                            <td class="style3">
                                Department</td>
                            <td>
<asp:DropDownList ID="DropDownListDEPARTMENT" runat="server" Width="124px">
      <asp:ListItem>Select 1</asp:ListItem>
      <asp:ListItem>Sales</asp:ListItem>
                                <asp:ListItem>Production</asp:ListItem>
                                    <asp:ListItem>Administrative</asp:ListItem>
                                    <asp:ListItem>Transport</asp:ListItem>
                                    <asp:ListItem>Purchase</asp:ListItem>
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <tr>
                            <td class="style3">
                                Employee Name</td>
                            <td>
    <asp:TextBox ID="TextBoxEMPNAME" runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td class="style3">
                                Area Of Posting</td>
                            <td>
   asp:TextBox ID="TextBoxAREAOFPOSTING" runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td class="style3">
                                &nbsp;</td>
                            <td>
                                &nbsp;</td>
                        </tr>
                    </table>
                </asp:WizardStep>
   <asp:WizardStep ID="PostingDetails" runat="server" Title="Step 3">
                    <table class="style1">
                        <tr>
                            <td colspan="2">
                                <strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Posting&nbsp; Details</strong></td>
                        </tr>
                        <tr>
                            <td class="style5">
                                &nbsp;</td>
                            <td>
                                &nbsp;</td>
                        </tr>
                        <tr>
                            <td class="style6">
                                Employee Name</td>
                            <td>
   <asp:TextBox ID="TextBoxEMPLOYEENAME" runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td class="style6">
                                Designation</td>
                            <td>
 <asp:TextBox ID="TextBoxEMPDESIGNATION" runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td class="style6">
                                Date Of Join</td>
                            <td>
   <asp:TextBox ID="TextBoxDOBJOIN" runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td class="style4">
                                <strong>Conformation</strong></td>
                            <td>
  <asp:TextBox ID="TextBoxCONFORMATION" runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td class="style6">
                                (Tranfer)</td>
                            <td>
                                &nbsp;</td>
                        </tr>
                        <tr>
                            <td class="style6">
                                &nbsp;</td>
                            <td>
                                &nbsp;</td>
                        </tr>
                    </table>
                </asp:WizardStep>
                <asp:WizardStep ID="CurrentSalary" runat="server" Title="Step 4">
                    <table class="style1">
                        <tr>
                            <td colspan="2">
                                <strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Current Salary</strong></td>
                        </tr>
                        <tr>
                            <td class="style10">
                                &nbsp;</td>
                            <td>
                                &nbsp;</td>
                        </tr>
                        <tr>
                            <td class="style9">
                                Emp Name</td>
                            <td class="style7">
<asp:TextBox ID="TextBoxEMPLOYEEFULLNAME" runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td class="style10">
                                Remunaretion</td>
                            <td>
<asp:TextBox ID="TextBoxEMPREMUNARETION" runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td class="style10">
                                Basic</td>
                            <td>
  <asp:TextBox ID="TextBoxBASIC" runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td class="style10">
                                PF</td>
                            <td>
         <asp:TextBox ID="TextBoxPF" runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td class="style10">
                                ESI</td>
                            <td>
         <asp:TextBox ID="TextBoxESI" runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td class="style10">
                                TDS</td>
                            <td>
            <asp:TextBox ID="TextBoxTDS" runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td class="style10">
                                Year Leave No.</td>
                            <td>
     <asp:TextBox ID="TextBoxYEARLEAVE" runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td class="style10">
                                &nbsp;</td>
                            <td>
                                &nbsp;</td>
                        </tr>
                    </table>
                </asp:WizardStep>
            </WizardSteps>
        </asp:Wizard>
   
    </div>
    </form>
</body>
</html>



Create Database store data in SQl Server 


Code View 

using System;

using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using System.Web.Security;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class Wizard_employee : System.Web.UI.Page
{
   
    protected void ButtonSAVE_Click(object sender, EventArgs e)
    {
        string sName = TextBoxNAME.Text;
        string sDesignation = TextBoxDESIGNATION.Text;
        string sRemunaretion = TextBoxREMUNARETION.Text;
        string sQualification = TextBoxQUALIFICATION.Text;
        string sRegBy = TextBoxREG_BY.Text;
        string sDob = TextBoxDOB.Text;
        string sJoinDate = TextBoxJOINDATE.Text;
        string sNowPosting = TextBoxNOWPOSTING.Text;
        string sDepartment = DropDownListDEPARTMENT.Text;
        string sEmpName = TextBoxEMPNAME.Text;
        string sAreaOfPosting = TextBoxAREAOFPOSTING.Text;
        string sEmployeeName = TextBoxEMPLOYEENAME.Text;
        string sEmpDesignation = TextBoxEMPDESIGNATION.Text;
        string sDOJoin = TextBoxDOBJOIN.Text;
        string sConformation = TextBoxCONFORMATION.Text;
        string sEmpNamee = TextBoxEMPLOYEEFULLNAME.Text;
        string sEremunaretion = TextBoxEMPREMUNARETION.Text;
        string sEbasic = TextBoxBASIC.Text;
        string sEpf = TextBoxPF.Text;
        string sEESI = TextBoxESI.Text;
        string sETDS = TextBoxTDS.Text;
        string sYearOfLeave = TextBoxYEARLEAVE.Text;

        string connectionString = ConfigurationManager.ConnectionStrings["DataBaseConnection"].ConnectionString;
        string insertSql = "INSERT INTO EMPLOYEE_INFORMATIOIN(NAME,DESIGNATION,remunaretion,qualification,reg_by,dob,joindate,nowposting,department,employeeName,areaOfPosting,EmpName,Edesignation,dojoin,conformation,Empnamee,ERemunaretion,Ebasic,Epf,EESI,ETDS,YearOfLeave) VALUES(@NAME,@DESIGNATION,@remunaretion,@qualification,@reg_by,@dob,@joindate,@nowposting,@department,@employeeName,@areaOfPosting,@EmpName,@Edesignation,@dojoin,@conformation,@Empnamee,@ERemunaretion,@Ebasic,@Epf,@EESI,@ETDS,@YearOfLeave)";

        using (SqlConnection myConnection = new SqlConnection(connectionString))
        {
            myConnection.Open();
            SqlCommand myCommand = new SqlCommand(insertSql, myConnection);
            myCommand.Parameters.AddWithValue("@NAME", TextBoxNAME.Text);
            myCommand.Parameters.AddWithValue("@Designation",TextBoxDESIGNATION.Text);
            myCommand.Parameters.AddWithValue("@REMUNARETION",TextBoxREMUNARETION.Text);
            myCommand.Parameters.AddWithValue("@Qualification",TextBoxQUALIFICATION.Text);
            myCommand.Parameters.AddWithValue("@REG_BY",TextBoxREG_BY.Text);
            myCommand.Parameters.AddWithValue("@dob",TextBoxDOB.Text);
            myCommand.Parameters.AddWithValue("@joindate",TextBoxJOINDATE.Text);
            myCommand.Parameters.AddWithValue("@nowposting",TextBoxNOWPOSTING.Text);
            myCommand.Parameters.AddWithValue("@department",DropDownListDEPARTMENT.SelectedValue);
            myCommand.Parameters.AddWithValue("@employeeName",TextBoxEMPNAME.Text);
            myCommand.Parameters.AddWithValue("@areaOfPosting",TextBoxAREAOFPOSTING.Text);
            myCommand.Parameters.AddWithValue("@EmpName",TextBoxEMPLOYEENAME.Text);
            myCommand.Parameters.AddWithValue("@Edesignation",TextBoxEMPDESIGNATION.Text);
            myCommand.Parameters.AddWithValue("@dojoin",TextBoxDOBJOIN.Text);
            myCommand.Parameters.AddWithValue("@conformation",TextBoxCONFORMATION.Text);
            myCommand.Parameters.AddWithValue("@empNamee",TextBoxEMPLOYEEFULLNAME.Text);
            myCommand.Parameters.AddWithValue("@ERemunaretion",TextBoxEMPREMUNARETION.Text);
            myCommand.Parameters.AddWithValue("@Ebasic",TextBoxBASIC.Text);
            myCommand.Parameters.AddWithValue("@Epf",TextBoxPF.Text);
            myCommand.Parameters.AddWithValue("@EESI",TextBoxESI.Text);
            myCommand.Parameters.AddWithValue("@ETDS",TextBoxTDS.Text);
            myCommand.Parameters.AddWithValue("@YearOfLeave",TextBoxYEARLEAVE.Text);    

            myCommand.ExecuteNonQuery();
            myConnection.Close();
        }

        // "Reset" the Subject and Body TextBoxes

         TextBoxNAME.Text= string.Empty;
         TextBoxDESIGNATION.Text= string.Empty;
         TextBoxREMUNARETION.Text= string.Empty;
         TextBoxQUALIFICATION.Text= string.Empty;
         TextBoxREG_BY.Text= string.Empty;
         TextBoxDOB.Text= string.Empty;
         TextBoxJOINDATE.Text= string.Empty;
         TextBoxNOWPOSTING.Text= string.Empty;
        // DropDownListDEPARTMENT.Text= string.Empty;
         TextBoxEMPNAME.Text= string.Empty;
         TextBoxAREAOFPOSTING.Text= string.Empty;
         TextBoxEMPLOYEENAME.Text= string.Empty;
         TextBoxEMPDESIGNATION.Text= string.Empty;
         TextBoxDOBJOIN.Text= string.Empty;
        TextBoxCONFORMATION.Text= string.Empty;
         TextBoxEMPLOYEEFULLNAME.Text= string.Empty;
         TextBoxEMPREMUNARETION.Text= string.Empty;
         TextBoxBASIC.Text= string.Empty;
         TextBoxPF.Text= string.Empty;
         TextBoxESI.Text= string.Empty;
         TextBoxTDS.Text= string.Empty;
        TextBoxYEARLEAVE.Text= string.Empty;
    }
}




Thursday, August 9, 2018

Check Box uses | Multiple selections Option in online software | web Applications | Sradha webcreations

Check Box uses | Multiple selections Option in online software | web Applications | Websites 
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class CHECK_BOX_MAILBOX : System.Web.UI.Page
{
    string sName;
    string sdob;
   
    protected void CheckBoxSPORTS_CheckedChanged(object sender, EventArgs e)
    {
        string sname = TextBox1.Text;
        string sdob = TextBox2.Text;
        if (CheckBoxSPORTS.Checked == true)
        {
            TextBox3.Visible = true;
            TextBox3.Text = "SPORTS";
        }
        else
        {
            TextBox3.Visible = false;
        }
    }
    protected void CheckBoxDANCING_CheckedChanged(object sender, EventArgs e)
    {
        string sname = TextBox1.Text;
        string sdob = TextBox2.Text;
        if (CheckBoxSPORTS.Checked == true)
        {
            TextBox4.Visible = true;
            TextBox4.Text = "DANCING";
        }
        else
        {
            TextBox4.Visible = false;
        }
    }
   
    protected void CheckBoxTRAVELLING_CheckedChanged1(object sender, EventArgs e)
    {
        string sname = TextBox1.Text;
        string sdob = TextBox2.Text;
        if (CheckBoxSPORTS.Checked == true)
        {
            TextBox5.Visible = true;
            TextBox5.Text = "TRAVELLING";
        }
        else
        {
            TextBox5.Visible = false;
        }
    }
    protected void CheckBoxSINGING_CheckedChanged1(object sender, EventArgs e)
    {

        string sname = TextBox1.Text;
        string sdob = TextBox2.Text;
        if (CheckBoxSPORTS.Checked == true)
        {
            TextBox6.Visible = true;
            TextBox6.Text = "SINGING";
        }
        else
        {
            TextBox6.Visible = false;
        }
    }
}

how ti create insurance website & application | Check box users in Asp.net | Sradha Webcreations

how ti create insurance website  & application
 Check box users in Asp.net

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class CHECK_BOX_CHECKBOX : System.Web.UI.Page
{
   protected void CheckBox1_CheckedChanged(object sender, EventArgs e)
    {
        String sName = TextBox1.Text;
        string sfathersName = TextBox2.Text;
        string sAddress = TextBox3.Text;
        string sPhoneNumber = TextBox4.Text;
        if (CheckBox1.Checked == true)
        {
          Label1.Text = "data accepted";
        }
        else
        {
           Label1.Text = "data IS NOT accepted";
        }
    }
    }




Interest Calculation Online Web Application / Software



using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class CHECK_BOX_INTREST_CALCULATION : System.Web.UI.Page
{
      
    protected void CheckBoxSIMPLEINTREST_CheckedChanged(object sender, EventArgs e)
    {
        double DPrincipal = Convert.ToDouble(TextBox1.Text);
        double dRateOfIntrest = Convert.ToDouble(TextBox2.Text);
        double dTime = Convert.ToDouble(TextBox3.Text);

        double dSimpleIntrest=(DPrincipal*dRateOfIntrest*dTime)/100;
        if (CheckBoxSIMPLEINTREST.Checked == true)
        {
            TextBox4.Visible = true;
            TextBox4.Text = Convert.ToString(dSimpleIntrest);
        }
        else
        {
            TextBox4.Visible = false;
        }
    }  



}

how to use list box in asp.net | item selection Controls | Sradha Webcreations

how to use list box in asp.net | item selection Controls




using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class COMBO_BOX_DROPDOWN_ADD_REMOVE : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
       ListBox1.Items.Add("INFORMATON TECHNOLOGY");
        ListBox1.Items.Add("C");
        ListBox1.Items.Add("C++");
        ListBox1.Items.Add("DOS");
        ListBox1.Items.Add("VB");
        ListBox1.Items.Add("CORE JAVA");
        ListBox1.Items.Add("ADVANCE JAVA");
        ListBox1.Items.Add("WEB TECHNOLOGY");
        ListBox1.Items.Add("ADDA");
        ListBox1.Items.Add("MANAGEMENT ACCOUNTING");
        ListBox1.Items.Add("OPERATION RESEARCH");
        ListBox1.Items.Add("SOFTWARE ENGINEERING");
        ListBox1.Items.Add("DBMS");
        ListBox1.Items.Add("RDBMS");
        ListBox1.Items.Add("SQL SERVER");
        ListBox1.Items.Add("ORACLE");
        ListBox1.Items.Add("MY SQL");
        ListBox1.Items.Add("PL/SQL");
        ListBox1.Items.Add("PHP");
        ListBox1.Items.Add(".NET");
    }
    protected void Button2_Click(object sender, EventArgs e)
    {
        ListBox2.Items.Remove(ListBox2.SelectedItem.Text);    

    }
    protected void ButtonADD_Click(object sender, EventArgs e)
    {
        ListBox2.Items.Add(ListBox1.SelectedItem.Text);

    }
}