protected void Page_Load(object sender, EventArgs e) { if (Session["data"] != null)//session checking { if (!IsPostBack) { PropDestination objDes = new PropDestination(); ddlSitename.DataSource = BusinessNewPurchase.busFillDestination(objDes); ddlSitename.DataBind(); } } }
protected void btnSubmitsite_Click(object sender, EventArgs e) { PropDestination newsite = new PropDestination(); newsite.Name = txtPopSiteName.Text; newsite.Address = txtaddress.Text; int op = BusinessNewPurchase.busPopSite(newsite); if (op <= 0) { ClientScript.RegisterStartupScript(Page.GetType(), "test21", "<script>window.opener.location.reload(true);window.close();</script>"); } else { Response.Write("Error in processing.Please Try Again!!"); } }
protected void Page_Load(object sender, EventArgs e) { if (Session["data"] != null)//session checking { if (!IsPostBack) { PropItem objItem = new PropItem(); ddlItemName.DataSource = BusinessNewPurchase.busSelectItem(objItem); ddlItemName.DataBind();//data binding PropCategory objcat = new PropCategory(); ddlCategory.DataSource = BusinessNewPurchase.busSelectCategory(objcat); ddlCategory.DataBind(); PropVendor objVendor = new PropVendor(); ddlSupplierName.DataSource = BusinessNewPurchase.busSelectVendor(objVendor); ddlSupplierName.DataBind(); PropDestination objDes = new PropDestination(); DdlSite.DataSource = BusinessNewPurchase.busFillDestination(objDes); DdlSite.DataBind(); //propunit objUnit = new propunit(); //drplUnit.DataSource = BusinessNewPurchase.busSelectUnit(objUnit); //drplUnit.DataBind(); addItem.Attributes.Add("onclick", "openPopUp('PopUpItem.aspx')"); AddVendor.Attributes.Add("onclick", "openPopUpVendor('PopUpVendor.aspx')"); } Label1.Text = ""; } else { Response.Redirect("~/Login.aspx");//page redirection } }
// public static DataSet busSelectUnit(propunit objunit) //{ // return DalItemPurchase.FillDDlUnit(objunit); //} public static DataSet busFillDestination(PropDestination objDes) { return(DalItemPurchase.FillDDlDestination(objDes)); }
public static int busPopSite(PropDestination objsite) { return(DalItemPurchase.Insertpopsite(objsite)); }
public static DataSet FillDDlDestination(PropDestination objdes) { return(DBManager.ExecuteDataset("spSelectDestination")); }
public static int Insertpopsite(PropDestination objsite) { return(DBManager.ExecuteNonQuery("spPopInserItemName", objsite.Name, objsite.Address)); }