Showing posts with label data store in sql server. Show all posts
Showing posts with label data store in sql server. Show all posts

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;
        }
    }
}

Saturday, July 28, 2018

how to create Phone call Database management system | sradha webcreations

Phone call Database management system in asp.net  Sql Server


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

public partial class IF_ELSE_AND_OR_PhoneCallCalculation : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void TextBox3_TextChanged(object sender, EventArgs e)
    {
        string sCustomerName = TextBoxCUSTOMERNAME.Text;
        string sPhoneNumber = TextBoxPHONENUMBER.Text;
        int iTotalCall =Convert.ToInt32( TextBoxTOTALCALL.Text);
       
        int iExtraCall;
        iExtraCall = iTotalCall - 200;

        int iExtraCall400;
        iExtraCall400=iTotalCall-400;

        int iExtraCall600;
        iExtraCall600=iTotalCall-600;

        double dCallCharge;
      
        if (iTotalCall <= 200)
        {
            dCallCharge = 200;
        }
        else if (iTotalCall > 200 && iTotalCall <= 400)
        {
            dCallCharge=200+(iExtraCall*1.50);
        }
        else if (iTotalCall > 400 && iTotalCall <= 600)
        {
            dCallCharge = 200 + (200 * 1.50) + (iExtraCall400 * 2.50);
        }
        else
        {
            dCallCharge=200+(200*1.50)+(200*2.50)+(iExtraCall600*3.50);

        }
        TextBoxCALLCHARGE.Text = Convert.ToString(dCallCharge);
    }
    }




Thursday, July 26, 2018

LABOUR OVER DUTY management system in asp.net | sradha webcreations

LABOUR OVER DUTY management system in asp.net



LABOUR OVERDUTY




ENTER LABOUR NAME

ENTER WORKING HOUR

LABOUR CHARGE

SAVE

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

public partial class LABOUR : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
 protected void TextBoxWORKING_TextChanged(object sender, EventArgs e)
    {
        string sName = TextBoxNAME.Text;
        int iWorkingHours = Convert.ToInt32(TextBoxWORKING.Text);
        double dLabourCharge;
        int iExtraHours;

        if (iWorkingHours <= 8)
        {
            dLabourCharge = 250;
        }
        else
        {
            iExtraHours = iWorkingHours - 8;
            dLabourCharge = (iExtraHours * 200)+250;
        }
        TextBoxLABOURCHARGE.Text = Convert.ToString(dLabourCharge);
    }
    protected void ButtonSAVE_Click(object sender, EventArgs e)
    {
        string connectionstring = ConfigurationManager.ConnectionStrings["DbConnection"].ConnectionString;
        string insertsql = "insert into labourcharge(labourName,WorkingHours,LabourCharge)values(@labourName,@WorkingHours,@LabourCharge)";

        using (SqlConnection myconnection = new SqlConnection(connectionstring))
        {
            myconnection.Open();
            SqlCommand mycommand = new SqlCommand(insertsql, myconnection);
  mycommand.Parameters.AddWithValue("@labourname", TextBoxNAME.Text);
mycommand.Parameters.AddWithValue("@workinghours", TextBoxWORKING.Text); mycommand.Parameters.AddWithValue("labourcharge", TextBoxLABOURCHARGE.Text);

            mycommand.ExecuteNonQuery();
            mycommand.Clone();
        }
        TextBoxNAME.Text = string.Empty;
        TextBoxWORKING.Text = string.Empty;
        TextBoxLABOURCHARGE.Text = string.Empty;
      }
}


Wednesday, July 25, 2018

how to calculate Finance in asp.net | sradha webcreations

how to calculate Finance in asp.net 


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

public partial class finance_calculator : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    double dSowRoomPrice;
    double dBalance;
    double dTotalFinanceAmount;

    protected void TextBoxDownPayment_TextChanged(object sender, EventArgs e)
    {
        double dDownPayment;
        double dDownpaymentAmount;
       // float fBalance;

        dSowRoomPrice = Convert.ToDouble(TextBoxShowRoomPrice.Text);
        dDownPayment = Convert.ToDouble(TextBoxDownPayment.Text);
        dDownpaymentAmount = dSowRoomPrice * 30 / 100;
 TextBoxDownPaymentAmount.Text = Convert.ToString(dDownpaymentAmount);
       dBalance = dSowRoomPrice - dDownpaymentAmount;
       TextBoxBalance.Text = Convert.ToString(dBalance);   
    }

    protected void TextBoxRateOfIntrest_TextChanged(object sender, EventArgs e)
   
{
        double dRateOfIntrest;
        double dTotalRateOfIntrestAmount;
      //  float fTotalFinanceAmount;
    
        dRateOfIntrest = Convert.ToDouble(TextBoxRateOfIntrest.Text);
        dBalance=Convert.ToDouble(TextBoxBalance.Text);
        dTotalRateOfIntrestAmount = dBalance * dRateOfIntrest / 100  TextBoxTotalIntrest.Text = Convert.ToString(dTotalRateOfIntrestAmount);
        dTotalFinanceAmount = dBalance + dTotalRateOfIntrestAmount;
TextBoxTotalFinanceAmount.Text = Convert.ToString(dTotalFinanceAmount);
    }

    protected void TextBoxDuration_TextChanged(object sender, EventArgs e)
    {
        int iDuration;
        double dEMI;

        iDuration = Convert.ToInt32(TextBoxDuration.Text);
TotalFinanceAmount = Convert.ToDouble(TextBoxTotalFinanceAmount.Text);
        dEMI = dTotalFinanceAmount / iDuration;
        TextBoxEMI.Text = Convert.ToString(dEMI);
    }

    protected void ButtonSAVE_Click(object sender, EventArgs e)
    {
        string connectionstring = ConfigurationManager.ConnectionStrings["DbConnection"].ConnectionString;

        string insertsql = "insert into financecalculator(showroomprice,downpayment,downpaymentamount,balance,rateofintrest,intrestamount,totalfinance,duration,emi)values(@showroomprice,@downpayment,@downpaymentamount,@balance,@rateofintrest,@intrestamount,@totalfinance,@duration,@emi)";

        using (SqlConnection myconnection = new SqlConnection(connectionstring))
        {
            myconnection.Open();
       SqlCommand mycommand = new SqlCommand(insertsql,myconnection);
     mycommand.Parameters.AddWithValue("@showroomprice",TextBoxShowRoomPrice.Text);
   mycommand.Parameters.AddWithValue("@downpayment",TextBoxDownPayment.Text);         mycommand.Parameters.AddWithValue("@downpaymentamount",TextBoxDownPaymentAmount.Text);
mycommand.Parameters.AddWithValue("@balance",TextBoxBalance.Text);
mycommand.Parameters.AddWithValue("@rateofintrest",TextBoxRateOfIntrest.Text);
mycommand.Parameters.AddWithValue("@intrestamount",TextBoxTotalIntrest.Text);
mycommand.Parameters.AddWithValue("@totalfinance",TextBoxTotalFinanceAmount.Text);
mycommand.Parameters.AddWithValue("@duration",TextBoxDuration.Text);
            mycommand.Parameters.AddWithValue("@emi",TextBoxEMI.Text);

            mycommand.ExecuteNonQuery();
            myconnection.Close();

        }
        TextBoxShowRoomPrice.Text = string.Empty;
        TextBoxDownPayment.Text = string.Empty;
        TextBoxDownPaymentAmount.Text = string.Empty;
        TextBoxBalance.Text = string.Empty;
        TextBoxRateOfIntrest.Text = string.Empty;
        TextBoxTotalIntrest.Text = string.Empty;
        TextBoxTotalFinanceAmount.Text = string.Empty;
        TextBoxDuration.Text = string.Empty;
        TextBoxEMI.Text = string.Empty;
    }
}