示例#1
0
 public void FillProductGroup()
 {
     ddlItemGroup.DataSource     = groupBll.GetAllGroup();
     ddlItemGroup.DataValueField = "GroupId";
     ddlItemGroup.DataTextField  = "GroupName";
     ddlItemGroup.DataBind();
     ddlItemGroup.Items.Insert(0, new ListItem("Select One", "0"));
 }
示例#2
0
 private void GetAllProductGroup()
 {
     try
     {
         List <Inv_ProductGroup> groups = groupBll.GetAllGroup();
         if (groups.Count > 0)
         {
             grdProductGroup.DataSource = groups;
             grdProductGroup.DataBind();
         }
     }
     catch (Exception)
     {
         throw;
     }
 }
        //Business Page Work...........................................

        protected void GetAllGroup()
        {
            try
            {
                var row = groupBll.GetAllGroup();
                if (row.Count > 0)
                {
                    ddlItemgroup.DataSource     = row.ToList();
                    ddlItemgroup.DataTextField  = "GroupName";
                    ddlItemgroup.DataValueField = "GroupId";
                    ddlItemgroup.DataBind();
                    ddlItemgroup.AppendDataBoundItems = false;
                    ddlItemgroup.Items.Insert(0, new ListItem("Select One", "0"));
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        //string OCODE = Convert.ToString(((SessionUser)Session["SessionUser"]).OCode);

        private void FillItemName()
        {
            try
            {
                var row = groupBll.GetAllGroup();
                if (row.Count > 0)
                {
                    ddlItemCategory.DataSource     = row.ToList();
                    ddlItemCategory.DataTextField  = "GroupName";
                    ddlItemCategory.DataValueField = "GroupId";
                    ddlItemCategory.DataBind();
                    ddlItemCategory.AppendDataBoundItems = false;
                    ddlItemCategory.Items.Insert(0, new ListItem("--Select Item Category--", "0"));
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }