Теми рефератів
> Реферати > Курсові роботи > Звіти з практики > Курсові проекти > Питання та відповіді > Ессе > Доклади > Учбові матеріали > Контрольні роботи > Методички > Лекції > Твори > Підручники > Статті Контакти
Реферати, твори, дипломи, практика » Статьи » Корпоративний портал бібліотеки В'яземського Політехнічного технікуму

Реферат Корпоративний портал бібліотеки В'яземського Політехнічного технікуму





ext= Читач: + Fio.ToString () ;. Visible=false; _Student.Visible=true; .Value=kod; .Value=fio; _Stydenta.Value=login ;;

}

{. Text= Такого Користувача немає raquo ;;

}

}

}

{. Close ();

}

/* Кінець - Читачі - Кінець */

/* Початок - Адміністрування - Початок * /=new SqlCommand () ;. Connection=www; .CommandText= Select * from Адміністрування raquo ;;

{. Open (); dr=SaveDocCommand.ExecuteReader (); kod= raquo ;; fio= raquo ;; login= raquo ;; pass= raquo ;; (dr.Read ())

{= dr [0] .ToString ();=dr [1] .ToString ();=dr [2] .ToString ();=dr [3] .ToString (); ( dr [2] .ToString () == TextBox1.Text amp; amp; dr [3] .ToString () == TextBox2.Text amp; amp; TextBox1.Text!= amp; amp; TextBox2.Text != )

{. Text= Адміністратор: + Fio.ToString () ;. Visible=false; _Admin.Visible=true; _Admin_Fio.Value=fio ;;

}

{. Text= Такого Користувача немає raquo ;;

}

}

}

{. Close ();

}

/* Кінець - Адміністрування - Кінець */

}

}

Панель читача, додавання даних

using System;System.Collections;System.Configuration;System.Data;System.Linq;System.Web;System.Web.Security;System.Web.UI;System.Web.UI.HtmlControls;System.Web.UI.WebControls;System.Web.UI.WebControls.WebParts;System.Xml.Linq;System.Data.SqlClient;System.IO;partial class Student: System.Web.UI.Page

{void Page_Load (object sender, EventArgs e)

{. Text= raquo ;; (! IsPostBack)

{(Request.UrlReferrer == null)

{. Redirect ( Default.aspx ) ;;

}

}

{. Value=((HiddenField) Page.PreviousPage.FindControl ( HiddenField1 )). Value; .Value=((HiddenField) Page.PreviousPage.FindControl ( HiddenField2 )).Value; .Text=HiddenField2.Value;

} (Exception ex)

{

}

} SqlConnection www=new SqlConnection ( Data Source =. SQLEXPRESS; AttachDbFilename=| DataDirectory | DB_Rabota.mdf; Integrated Security=True; User Instance=True );

/* String SavePath= raquo ;; string FullName; OldFileName; string ss;

*/dr=null; String CompleteFilePath= raquo ;; void ImageButton1_Click (object sender, ImageClickEventArgs e)

{. Text= raquo ;;

{= new DirectoryInfo (MapPath ( ~ Image/TEMP/)) ;. Create ();=MapPath ( ~ Image/TEMP/ + FileUpload1.FileName);.SaveAs (CompleteFilePath);

//The BLOB holds the byte array to save. [] BLOB;

//The FileStream is the stream of bytes

//that represent the binary file..IO.FileStream FileStream=new System.IO.FileStream (CompleteFilePath, System.IO.FileMode.Open, System.IO.FileAccess.Read);

//The reader reads the binary data from the FileStream..IO.BinaryReader reader=new System.IO.BinaryReader (FileStream);

//The BLOB is asigned the bytes from the reader.

//The file length is passed to the ReadBytes method

//telling it how many bytes to read..IO.FileInfo file=new FileInfo (CompleteFilePath);=reader.ReadBytes ((int) (file.Length)) ;. Close ();.Close ();

//Create a command object to save

//the BLOB value.SaveDocCommand=new SqlCommand () ;. Connection=www; .CommandText= INSERT INTO Відомості +

(Код_Сотрудніка, Код_Чітателя, Код_Кнігі, Код_Іздательства) +

VALUES (k_p, @ k_st, @ k_pred, @ k_k, @ i_f, @ sod, @ data, @ komp) raquo ;;

//Create parameters to store the filename and BLOB data.k_pP=new SqlParameter ( @ k_p raquo ;, SqlDbType.BigInt); k_stP=new SqlParameter ( @ k_st raquo ;, SqlDbType.BigInt ); k_predP=new SqlParameter ( @ k_pred raquo ;, SqlDbType.BigInt); k_kP=new SqlParameter ( @ k_k raquo ;, SqlDbType.BigInt); i_fP=new SqlParameter ( @ i_f raquo ;, SqlDbType.NVarChar); sodP=new SqlParameter ( @ sod raquo ;, SqlDbType.VarBinary); dataP=new SqlParameter ( @ data raquo ;, SqlDbType.SmallDateTime); kompP=new SqlParameter ( @ komp raquo ;, SqlDbType.NVarChar);.Parameters.Add(k_pP);.Parameters.Add(k_stP);.Parameters.Add(k_predP);.Parameters.Add(k_kP);.Parameters.Add(i_fP);.Parameters....


Назад | сторінка 11 з 18 | Наступна сторінка





Схожі реферати:

  • Реферат на тему: Поняття та використання Network File System
  • Реферат на тему: Edcation system in the USA
  • Реферат на тему: Legal system
  • Реферат на тему: UNIX System V
  • Реферат на тему: The system of accommodation in Perm