Ejemplo n.º 1
0
        protected void InitialDropdown()
        {
            try
            {
                DataSet      ds           = new DataSet();
                BLDepartment blDepartment = new BLDepartment();
                BLStatus     blStatus     = new BLStatus();

                ds = blDepartment.GetDepartment("");
                ddlDepartment.DataSource     = ds;
                ddlDepartment.DataValueField = "DEPT_ID";
                ddlDepartment.DataTextField  = "DEPT_NAME";
                ddlDepartment.DataBind();

                ds = blStatus.GetStatus("");
                ddlStatus.DataSource     = ds;
                ddlStatus.DataValueField = "STATUS_ID";
                ddlStatus.DataTextField  = "STATUS_NAME";
                ddlStatus.DataBind();

                ddlStatus.Items.Insert(0, new ListItem("ALL", ""));

                ddlDepartment.SelectedValue = hdDepartment.Value;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Ejemplo n.º 2
0
        public string GetStatus(string condition)
        {
            string result = "";

            try
            {
                DataSet  ds           = new DataSet();
                BLStatus blDepartment = new BLStatus();

                Utility utility = new Utility();

                ds     = blDepartment.GetStatus(condition);
                result = utility.DataTableToJSONWithJavaScriptSerializer(ds.Tables[0]);
            }
            catch (Exception ex)
            {
                //throw ex;
            }

            return(result);
        }