public List<Stationary_Catalogue> getItemName(String statCat)
 {
     Stationary_Catalogue sCat = new Stationary_Catalogue();
     sCat.Category = statCat;
     List<Stationary_Catalogue> itemName = statCatEnt.getStatCat(sCat);
     return itemName;
 }
        protected void btnGenereatePO_Click(object sender, EventArgs e)
        {
            List<Stationary_Catalogue> lstItems = new List<Stationary_Catalogue>();
            int count = 0;
            foreach (GridViewRow r in GridView1.Rows)
            {
                CheckBox chk = (CheckBox)r.FindControl("selChkBox");
                if (chk.Checked)
                {
                    //lblCheck.Text += r.Cells[1].Text + "<br>";
                    Stationary_Catalogue item = new Stationary_Catalogue();
                    item.Item_Code = r.Cells[1].Text;
                    lstItems.Add(item);
                    count++;
                }

            }

            if (lstItems.Count > 0)
            {
                Session["itemCode"] = lstItems;

                Response.BufferOutput = true;
                Response.Redirect("PurchaseOrder.aspx");
            }

            else
                lblStatus2.Text = "No record selected";
        }
 public List<view_Check_Existing_Stock> getBalanceByItemCode(string itCode)
 {
     Stationary_Catalogue stCat = new Stationary_Catalogue();
     stCat.Item_Code = itCode;
     List<view_Check_Existing_Stock> balance = statCatEnt.getExistingStock(stCat);
     return balance;
 }
 public List<Stationary_Catalogue> getItemDescription(string category)
 {
     StationaryCatalogueEnt ent = new StationaryCatalogueEnt();
     Stationary_Catalogue searchCat = new Stationary_Catalogue();
     searchCat.Category = category;
     List<Stationary_Catalogue> desc = ent.getStatCat(searchCat);
     return desc;
 }
 public List<Stationary_Catalogue> getItemCode(string description)
 {
     StationaryCatalogueEnt ent = new StationaryCatalogueEnt();
     Stationary_Catalogue searchCat = new Stationary_Catalogue();
     searchCat.Description = description;
     List<Stationary_Catalogue> code = ent.getStatCat(searchCat);
     return code;
 }
 public List<view_Check_Existing_Stock> getUnitQtyByName(String desc, String Cat)
 {
     Stationary_Catalogue stCt=new Stationary_Catalogue();
     stCt.Description= desc;
     stCt.Category= Cat;
     List<view_Check_Existing_Stock> qtyUnit= statCatEnt.getExistingStock(stCt);
     return qtyUnit;
 }
        public List<view_Check_Existing_Stock> getExistingStock(Stationary_Catalogue scatalogue)
        {
            var q = from vs in ContextDB.view_Check_Existing_Stock
                    where (vs.Category == scatalogue.Category || scatalogue.Description == null)
                   && (vs.Description == scatalogue.Description || scatalogue.Description == null)
                    select vs;

            return q.ToList<view_Check_Existing_Stock>();
        }
        public List<Stationary_Catalogue> getStatCat(Stationary_Catalogue sc)
        {
            var q = from s in ContextDB.Stationary_Catalogue
                    where (s.Item_Code == sc.Item_Code || sc.Item_Code == null)
                    && (s.Category == sc.Category || sc.Category == null)
                    && (s.Description == sc.Description || sc.Description == null)
                    && (s.Reorder_Level == sc.Reorder_Level || sc.Reorder_Level == null)
                    && (s.Reorder_Qty == sc.Reorder_Qty || sc.Reorder_Qty == null)
                    && (s.UOM == sc.UOM || sc.UOM == null)
                    select s;

            return q.ToList<Stationary_Catalogue>();
        }
 public void createStatCat(Stationary_Catalogue sc)
 {
     ContextDB.Stationary_Catalogue.AddObject(sc);
     ContextDB.SaveChanges();
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the Stationary_Catalogue EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToStationary_Catalogue(Stationary_Catalogue stationary_Catalogue)
 {
     base.AddObject("Stationary_Catalogue", stationary_Catalogue);
 }
 /// <summary>
 /// Create a new Stationary_Catalogue object.
 /// </summary>
 /// <param name="item_Code">Initial value of the Item_Code property.</param>
 public static Stationary_Catalogue CreateStationary_Catalogue(global::System.String item_Code)
 {
     Stationary_Catalogue stationary_Catalogue = new Stationary_Catalogue();
     stationary_Catalogue.Item_Code = item_Code;
     return stationary_Catalogue;
 }