コード例 #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();
         }
     }
 }
コード例 #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!!");
            }
        }
コード例 #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
            }
        }
コード例 #4
0
        // public static DataSet busSelectUnit(propunit objunit)
        //{
        //    return DalItemPurchase.FillDDlUnit(objunit);
        //}


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