Exemplo n.º 1
0
 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();
         }
     }
 }
Exemplo n.º 2
0
        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!!");
            }
        }
Exemplo n.º 3
0
        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
            }
        }
Exemplo n.º 4
0
        // public static DataSet busSelectUnit(propunit objunit)
        //{
        //    return DalItemPurchase.FillDDlUnit(objunit);
        //}


        public static DataSet busFillDestination(PropDestination objDes)
        {
            return(DalItemPurchase.FillDDlDestination(objDes));
        }
Exemplo n.º 5
0
 public static int busPopSite(PropDestination objsite)
 {
     return(DalItemPurchase.Insertpopsite(objsite));
 }
Exemplo n.º 6
0
 public static DataSet FillDDlDestination(PropDestination objdes)
 {
     return(DBManager.ExecuteDataset("spSelectDestination"));
 }
Exemplo n.º 7
0
 public static int Insertpopsite(PropDestination objsite)
 {
     return(DBManager.ExecuteNonQuery("spPopInserItemName", objsite.Name, objsite.Address));
 }