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




how to create Student Database management system | sradha webcreations

Student 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.Security;


public partial class IF_ELSE_AND_OR_PERCENTAGE : System.Web.UI.Page
{ 
    protected void TextBoxTOTALMARKS_TextChanged1(object sender, EventArgs e)
    {
        string sName = TextBoxNAME.Text;
        double dTotalMark =Convert.ToDouble( TextBoxTOTALMARKS.Text);
        double dpercentages;
       
        dpercentages=(dTotalMark/1000)*100;
        TextBoxPERCENTAGE.Text=Convert.ToString(dpercentages);
        string sGrade;
       
        if(dpercentages>=60)
        {
            sGrade="A";
        }
         else if(dpercentages>=50 && dpercentages<60)
        {
            sGrade="B";
        }
        else if(dpercentages>=40 && dpercentages<50 )
        {
            sGrade="C";
        }
        else
        {
            sGrade="F";
        }
        TextBoxGRADE.Text=Convert.ToString(sGrade);
        }}




how to create Employee management system | Sradha webcreations

Employee 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_SalaryCalculation : System.Web.UI.Page
{
       
    protected void TextBoxEXPERIENCE_TextChanged(object sender, EventArgs e)
    {
        string sEmployeeName = TextBoxEMPLOYEE.Text;
        double dBasic =Convert.ToDouble( TextBoxBASIC.Text);
        double dAnual;
        double dtotal;
       
        dAnual = dBasic * 12;
        TextBoxANUAL.Text = Convert.ToString(dAnual);

        int iAge = Convert.ToInt32(TextBoxAGE.Text);
        double dExperience = Convert.ToDouble(TextBoxEXPERIENCE.Text);
        double dBonus;
        if (iAge > 35 && dExperience > 3)
        {
            dBonus = dAnual * 11 / 100;
            dtotal = dAnual + dBonus;
        }
        else
        {
            dBonus = 0;
            dtotal = dAnual;
        }
        TextBoxBONUS.Text = Convert.ToString(dBonus);
        TextBoxTOTAL.Text = Convert.ToString(dtotal);
        }
    }








Friday, July 27, 2018

how to develop Hospital management system in asp.net Ms Visual Studio, Sql Server | Sradha WebCreations

Hospital management system in asp.net  Ms Visual Studio, Sql Server

 http://sradhawebcreations.com/


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 HotelRoomCharge : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
   
    protected void TextBoxDATEOFLEAVE_TextChanged(object sender, EventArgs e)
    {
        string sCustomerName = TextBoxCUSTOMERNAME.Text;
        string sCustomerAddress = TextBoxCUSTOMERADD.Text;
        string sDateOfEntry = TextBoxDATEENTRY.Text;
        DateTime dDE = Convert.ToDateTime(sDateOfEntry);
        string sDateOfLeave = TextBoxDATEOFLEAVE.Text;
        DateTime dDL = Convert.ToDateTime(sDateOfLeave);

        int iNumberOfDay;
        iNumberOfDay = ((TimeSpan)(dDL - dDE)).Days;
        TextBoxNUMBEROFDAY.Text = Convert.ToString(iNumberOfDay);  
      double dOtherCharge = Convert.ToDouble(TextBoxOTHERCHARGE.Text);
        double dTotalCharge;
        string sRoom = DropDownListROOM.Text;

       if (sRoom == "SINGLE")
        {
            dTotalCharge = (iNumberOfDay * 200) + dOtherCharge;
        }
        else
        {
            dTotalCharge = (iNumberOfDay * 500) + dOtherCharge;
        }
        TextBoxTOTALCHARGE.Text = Convert.ToString(dTotalCharge);
    }
}





Library management system in asp.net Ms Visual Studio, Sql Server | Sradha Webcreations

Library management system in Visual Studio, Sql Server 

 http://www.sradhawebcreations.com



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 _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
 protected void TextBoxRETURN_TextChanged(object sender, EventArgs e)
    {
        string sCardNumber = TextBoxCARDNUMBER.Text;
        string sBookNmae = TextBoxBOOKNAME.Text;
        string sStudentName = TextBoxSTUDENTNAME.Text;
       
        string sIssuedDate = TextBoxISSUED.Text;
        DateTime d1 = Convert.ToDateTime(sIssuedDate);

        string sReturnDate = TextBoxRETURN.Text;
        DateTime d2 = Convert.ToDateTime(sReturnDate);

        int iNumberOfDay;
        double dFine;

        iNumberOfDay = ((TimeSpan)(d2 - d1)).Days;
        TextBoxNUMBEROFDAY.Text = Convert.ToString(iNumberOfDay);

        if (iNumberOfDay <= 30)
        {
            dFine = 0;
        }
        else
        {
            dFine = iNumberOfDay * 10.00;
        }
        TextBoxFINE.Text = Convert.ToString(dFine);
    }

    protected void ButtonSAVE_Click(object sender, EventArgs e)
    {
        string connectionstring= ConfigurationManager.ConnectionStrings["dbconnection"].ConnectionString;
        string insertsql = "insert into libraryfine(cardnumber,bookname,issueddate,returneddate,noofdate,fine)values(@cardnumber,@bookname,@issueddate,@returneddate,@noofdate,@fine)";

        using (SqlConnection myconnection = new SqlConnection(connectionstring))
        {
            myconnection.Open();
        SqlCommand mycommand = new SqlCommand(insertsql,myconnection);
         mycommand.Parameters.AddWithValue("cardnumber",TextBoxCARDNUMBER.Text);
     mycommand.Parameters.AddWithValue("booknumber",TextBoxBOOKNAME.Text);
            mycommand.Parameters.AddWithValue("name",TextBoxSTUDENTNAME.Text);
            mycommand.Parameters.AddWithValue("issueddate",TextBoxISSUED.Text);
            mycommand.Parameters.AddWithValue("returneddate",TextBoxRETURN.Text);
            mycommand.Parameters.AddWithValue("noofday",TextBoxNUMBEROFDAY.Text);
            mycommand.Parameters.AddWithValue("fine",TextBoxFINE.Text);
            mycommand.ExecuteNonQuery();
            myconnection.Close();
        }
        TextBoxCARDNUMBER.Text = string.Empty;
        TextBoxBOOKNAME.Text = string.Empty;
        TextBoxSTUDENTNAME.Text = string.Empty;
        TextBoxISSUED.Text = string.Empty;
        TextBoxRETURN.Text = string.Empty;
        textbox
    }
}