public void FIllAllCollection()
        {
            List <ITEM_MASTER> fp = ITEM_MASTERCollection.GetAll();

            if (fp.Count > 0)
            {
                ListView2.DataSource = fp;
                ListView2.DataBind();
            }
        }
        public void FIllNewCollection()
        {
            List <ITEM_MASTER> fp = ITEM_MASTERCollection.GetAll().OrderByDescending(x => x.ITEM_ID).Take(12).ToList();

            if (fp.Count > 0)
            {
                ListView1.DataSource = fp;
                ListView1.DataBind();
            }
        }
Ejemplo n.º 3
0
 public void grid()
 {
     //SqlConnection con = new SqlConnection(@"Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database.mdf;Integrated Security=True;User Instance=True");
     //SqlCommand cmd = new SqlCommand("select * from tbl_data", con);
     //SqlDataAdapter sda = new SqlDataAdapter(cmd);
     //DataSet ds = new DataSet();
     //sda.Fill(ds);
     //gdvNotice.DataSource = ds;
     //gdvNotice.DataBind();
     gdvNotice.DataSource = ITEM_MASTERCollection.GetAll();
     gdvNotice.DataBind();
 }
        public void FIllSubProduct(int catid, int subcatid)
        {
            //List<ITEM_MASTER> fp = ITEM_MASTERCollection.GetAll().Where(x => (catid == 0 || x.CATEGORY_ID == catid) && (subcatid == 0 || x.SubCategory_ID == subcatid)).ToList();
            //if (fp.Count > 0)
            List <ITEM_MASTER> fp = ITEM_MASTERCollection.GetAll().Where(x => (subcatid == 0 || x.SubCategory_ID == subcatid)).ToList();

            if (fp.Count > 0)
            {
                ListView1.DataSource = fp;
                ListView1.DataBind();
            }
        }
Ejemplo n.º 5
0
        protected void txtPcode_TextChanged(object sender, EventArgs e)
        {
            string             username = txtPcode.Text.Trim();
            List <ITEM_MASTER> _rg      = ITEM_MASTERCollection.GetAll().FindAll(x => x.CODE == username);

            if (_rg.Count > 0)
            {
                gdvNotice.DataSource = _rg;
                gdvNotice.DataBind();
                txtPcode.Text = "";
            }
            else
            {
                ScriptManager.RegisterStartupScript(this, typeof(Page), "Alert", "<Script>alert('Not Record Found....');</Script>", false);
                txtPcode.Text = "";
                grid();
            }
        }
Ejemplo n.º 6
0
 public void fillCategory()
 {
     try
     {
         List <ITEM_MASTER> _state = ITEM_MASTERCollection.GetAll();
         ITEM_MASTER        sm     = new ITEM_MASTER();
         sm.ITEM_ID  = 0;
         sm.ITEMNAME = "-select Category-";
         _state.Insert(0, sm);
         ddlItem.DataSource     = _state;
         ddlItem.DataTextField  = "ITEMNAME";
         ddlItem.DataValueField = "ITEM_ID";
         ddlItem.DataBind();
     }
     catch (Exception ex)
     {
         string script = "<script>alert('" + ex.Message + "');</script>";
     }
 }
Ejemplo n.º 7
0
 public void grid()
 {
     gdvNotice.DataSource = ITEM_MASTERCollection.GetAll();
     gdvNotice.DataBind();
 }