Exemplo n.º 1
0
        private void GridDataBind()
        {
            try
            {
                ApplicationResult objResult = new ApplicationResult();
                VendorBL          objUOMBL  = new VendorBL();

                objResult = objUOMBL.Vendor_SelectAll();
                if (objResult != null)
                {
                    gvVendor.DataSource = objResult.resultDT;
                    gvVendor.DataBind();

                    if (objResult.resultDT.Rows.Count > 0)
                    {
                        PanelGrid_VisibilityMode(1);
                    }
                    else
                    {
                        PanelGrid_VisibilityMode(2);
                    }
                }
            }
            catch (Exception ex)
            {
                logger.Error("Error", ex);
                ClientScript.RegisterStartupScript(typeof(Page), "MessagePopUp", "<script>alert('Oops! There is some technical issue. Please Contact to your administrator.');</script>");
            }
        }
Exemplo n.º 2
0
        public void getVendorName()
        {
            ApplicationResult objResult   = new ApplicationResult();
            Controls          objControls = new Controls();
            VendorBL          objVendorBL = new VendorBL();

            objResult = objVendorBL.Vendor_SelectAll();
            if (objResult != null)
            {
                objControls.BindDropDown_ListBox(objResult.resultDT, ddlVendor, "VendorName", "VendorID");
                if (objResult.resultDT.Rows.Count > 0)
                {
                }
                ddlVendor.Items.Insert(0, new System.Web.UI.WebControls.ListItem("--Select--", "-1"));
            }
        }