Showing posts with label database management system. Show all posts
Showing posts with label database management system. Show all posts

Wednesday, August 1, 2018

how to create student Database Management system : Sradha Webcreations

Student Data Base Management System 
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);
        }}







Saturday, July 28, 2018

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




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



HOW TO DEVELOPED CAR PARKING MANAGEMENT SYSTEM IN ASP.NET | SRADHA WEBCREATIONS

HOW TO DEVELOPED CAR PARKING MANAGEMENT SYSTEM IN ASP.NET

CAR PARKING
DRIVER NAME
CAR NUMBER
ENTEY TIME
OUT TIME
DURATION OF PARKING
PAYMENT

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

    }
 protected void TextBoxOUTTIME_TextChanged(object sender, EventArgs e)
    {
        double dEntryTime = Convert.ToDouble(TextBoxENTRYTIME.Text);
        double dOuttime = Convert.ToDouble(TextBoxOUTTIME.Text);
        string dCarNumber = TextBoxCARNUMBER.Text;
        string sDriverName = TextBoxDRIVERNAME.Text;
        double dDuration;
        double dPayment;
        double dExtraHours;

        dDuration = dOuttime - dEntryTime;
        TextBoxDURATION.Text = Convert.ToString(dDuration);

        if (dDuration <= 12)
        {

            dPayment = 15.00;
        }
        else
        {
            dExtraHours = dDuration - 12;
            dPayment = (dExtraHours * 1.00) + 15.00;
        }
        TextBoxPAYMENT.Text = Convert.ToString(dPayment);
    }
   

protected void ButtonSAVE_Click(object sender, EventArgs e)
    {
        string connectionstring= ConfigurationManager.ConnectionStrings["dbconnection"].ConnectionString;
        string insertsql = "insert into carparking (drivername,carnumber,entrytime,outtime,duration,payment)values(@drivername,@carnumber,@entrytime,@outtime,@duration,@payment)";

        using (SqlConnection myconnection = new SqlConnection(connectionstring))
       {
           myconnection.Open();
        SqlCommand mycommand=new SqlCommand(insertsql,myconnection);
  mycommand.Parameters.AddWithValue("@drivername",TextBoxDRIVERNAME.Text);
       mycommand.Parameters.AddWithValue("@carnumber",TextBoxCARNUMBER.Text);
        mycommand.Parameters.AddWithValue("@entrytime",TextBoxENTRYTIME.Text);
        mycommand.Parameters.AddWithValue("@outtime",TextBoxOUTTIME.Text);
        mycommand.Parameters.AddWithValue("@duration",TextBoxDURATION.Text);
        mycommand.Parameters.AddWithValue("@payment",TextBoxPAYMENT.Text);
       
mycommand.ExecuteNonQuery();
        myconnection.Close();
            }
}