Add Items Page
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using System.Web.UI;
using System.IO;
using System.Web.UI.WebControls;
public partial class admin_additems : System.Web.UI.Page
{
BusinessLogic obj_businesslogic = new BusinessLogic();
protected void Page_Load(object sender, EventArgs e)
{
DataTable dt = obj_businesslogic.getitemtypes();
ddltypes.DataSource = dt;
ddltypes.DataTextField = "typename";
ddltypes.DataValueField = "i_autoid";
ddltypes.DataBind();
}
protected void btninsert_Click(object sender, EventArgs e)
{
if (uploadtypeimage.PostedFile != null)
{
//save the destination path of the image
string mymap = MapPath("~/");
// save the image name into ImageName
string ImageName = uploadtypeimage.FileName;
//save the full url of the image with folder name and image name
string ImageSaveURL = mymap + "Typeimages\\" + ImageName;
//upload image to the path of image
uploadtypeimage.PostedFile.SaveAs(ImageSaveURL);
uploadtypeimage.DataBind();
string typeimagepath = "~/" + "Typeimages\\" + ImageName;
if (obj_businesslogic.inserttypedata(typeimagepath, txttypename.Text.ToString()))
{
txtitemname.Text = "";
lblmsg0.Text = "Type Inserted";
}
}
}
protected void btnsubmit_Click(object sender, EventArgs e)
{
if (uploaditemimage.PostedFile != null)
{
//save the destination path of the image
string mymap = MapPath("~/");
// save the image name into ImageName
string ItemImageName = uploaditemimage.FileName;
//save the full url of the image with folder name and image name
string ImageSave = mymap + "itemimages\\" + ItemImageName;
//upload image to the path of image
uploaditemimage.PostedFile.SaveAs(ImageSave);
uploaditemimage.DataBind();
string itemimagepath = "~/" + "itemimages\\" + ItemImageName;
string itemname = txtitemname.Text.ToString();
int i_refid = Convert.ToInt32(ddltypes.SelectedValue.ToString());
if (obj_businesslogic.insertitemsdetails(i_refid,itemimagepath,itemname))
{
txtitemname.Text = "";
lblmsg.Text = "Item Inserted";
This site is designed to help BCA MCA student to develop final project and synopsis Download Free BCA Project, MCA Project, IT Projects, Final report and Project synopsis with Full documentation and code
Free download MCA projects in ASP.NET with complete source code, Free download MCA projects in VB,NET with complete source code, Free download MCA MSc projects in C#.net with complete source code,
Free download MCA projects in JAVA with complete source code, Free download MCA projects in PHP with complete source code, Free download BSc CS IT projects in PHP,JAVA, ASP.NET with source code
Computer Science Final Project , Free download MCA projects in asp.net , Free download MCA projects in vb.net, Free download MCA projects in C#.net, Free download MCA projects in java, Free download MCA projects in PHP