예제 #1
0
        public void BindTemplateName()
        {
            try
            {
                TrustTemplateBl   ObjTrustTemplateBl = new TrustTemplateBl();
                ApplicationResult objResult          = new ApplicationResult();
                Controls          objControls        = new Controls();

                objResult = ObjTrustTemplateBl.TrustTemplate_SelectAll(Convert.ToInt32(Session[ApplicationSession.TRUSTID]));
                if (objResult != null)
                {
                    if (objResult.resultDT.Rows.Count > 0)
                    {
                        objControls.BindDropDown_ListBox(objResult.resultDT, ddlSelectTemplateName, "TrustTemplateName", "TrustTemplateID");
                        ddlSelectTemplateName.Items.Insert(0, new ListItem("-Select-", ""));
                    }
                    else
                    {
                        Page.ClientScript.RegisterStartupScript(this.GetType(), "CallMyFunction", "divShow();", true);
                        btnSave.Visible = true;
                    }
                }
            }
            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>");
            }
        }
예제 #2
0
        private void GridTemplateBind()
        {
            try
            {
                TrustTemplateBl   objTrustItemBl = new TrustTemplateBl();
                ApplicationResult objResult      = new ApplicationResult();

                objResult = objTrustItemBl.TrustTemplate_SelectAll(Convert.ToInt32(Session[ApplicationSession.TRUSTID]));
                if (objResult != null)
                {
                    gvTemplates.DataSource = objResult.resultDT;
                    gvTemplates.DataBind();
                    if (objResult.resultDT.Rows.Count > 0)
                    {
                        gvPayTemplate.Visible = true;
                    }
                    else
                    {
                        gvPayTemplate.Visible = false;
                    }
                }
            }
            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>");
            }
        }
예제 #3
0
        private void BindTemplateName()
        {
            TrustTemplateBl   ObjTrustTemplateBl = new TrustTemplateBl();
            ApplicationResult objResult          = new ApplicationResult();
            Controls          objControls        = new Controls();

            objResult = ObjTrustTemplateBl.TrustTemplate_SelectAll(Convert.ToInt32(Session[ApplicationSession.TRUSTID]));
            if (objResult != null)
            {
                if (objResult.resultDT.Rows.Count > 0)
                {
                    objControls.BindDropDown_ListBox(objResult.resultDT, ddlTemplate, "TrustTemplateName", "TrustTemplateID");
                    ddlTemplate.Items.Insert(0, new ListItem("-Select-", ""));
                }
                else
                {
                    ClientScript.RegisterStartupScript(typeof(Page), "MessagePopUp", "<script>alert('Please Insert Trust Template');</script>");
                }
            }
        }