protected void ApplicationNameDDList_SelectedIndexChanged(object sender, EventArgs e)
        {
            var client = new FormManagmentServiceClient();

            FormListGridView.DataSource = client.ListForms(Convert.ToInt32(ApplicationNameDDList.SelectedValue));
            FormListGridView.DataBind();
        }
        private void LoadGridView()
        {
            var client = new FormManagmentServiceClient();

            FormListGridView.DataSource = client.ListForms(Convert.ToInt32(ApplicationNameDDList.SelectedValue));
            FormListGridView.DataBind();
        }
예제 #3
0
        private void LoadFormListGridView()
        {
            var client = new FormManagmentServiceClient();

            FormListGridView.DataSource = client.ListForms(Convert.ToInt32(DisplayDropDownList.SelectedValue));
            FormListGridView.DataBind();
        }
        protected void btnYes_Click(object sender, EventArgs e)
        {
            var client = new FormManagmentServiceClient();
            int formId = Convert.ToInt32(Request.QueryString["FormId"]);

            client.DeleteForm(formId);
            Response.Redirect("formPage.aspx");
        }
        void GetData()
        {
            var formModel = new FormModel();
            var client    = new FormManagmentServiceClient();
            int id        = Convert.ToInt32(Request.QueryString["FormId"]);

            formModel        = client.RetrieveForm(id);
            txtFormName.Text = formModel.FormName;
            txtCategory.Text = formModel.FormCategory;
        }
예제 #6
0
        private void LoadFromsNameDropDownList()
        {
            DataSet ds     = new DataSet();
            var     client = new FormManagmentServiceClient();

            ds = client.ListFormsName(Convert.ToInt32(DisplayDropDownList.SelectedValue));
            ListFormsDropDownList.DataSource     = ds;
            ListFormsDropDownList.DataTextField  = "TRANS_FORM_NAME";
            ListFormsDropDownList.DataValueField = "TRANS_FORM_NO";
            ListFormsDropDownList.DataBind();
        }
        protected void BTNupdate_Click(object sender, EventArgs e)
        {
            var formModel = new FormModel();
            var client    = new FormManagmentServiceClient();
            int id        = Convert.ToInt32(Request.QueryString["FormId"]);

            formModel.FormName     = txtFormName.Text;
            formModel.FormCategory = txtCategory.Text;
            string user = (string)Session["user"];

            client.UpdateForm(id, formModel, user);
            Response.Redirect("formPage.aspx");
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            var client = new FormManagmentServiceClient();

            //GridView1.DataSource = client.ListForms();
            //GridView1.DataBind();
            if (!Page.IsPostBack)
            {
                ApplicationNameDDList.DataSource     = LoadDropDownList();
                ApplicationNameDDList.DataTextField  = "TRANS_APP_NAME";
                ApplicationNameDDList.DataValueField = "TRANS_APP_NO";
                ApplicationNameDDList.DataBind();
                LoadGridView();
            }
        }
예제 #9
0
        protected void DisplayDropDownList_SelectedIndexChanged(object sender, EventArgs e)
        {
            var client = new FormManagmentServiceClient();


            //ListFormsDropDownList.DataSource = client.ListForms(Convert.ToInt32(DisplayDropDownList.SelectedValue));
            //ListFormsDropDownList.DataTextField = "TRANS_FORM_NAME";
            //ListFormsDropDownList.DataValueField = "TRANS_FORM_NO";
            //ListFormsDropDownList.DataBind();

            LoadFromsNameDropDownList();
            LoadFormListGridView();

            //    FormListGridView.DataSource = client.ListForms(Convert.ToInt32(DisplayDropDownList.SelectedValue));
            //FormListGridView.DataBind();
        }
        protected void btnAdd_Click(object sender, EventArgs e)
        {
            var applicationModel = new FormManagementServiceReference.ApplicationModel();

            // int appId = Convert.ToInt32(Request.QueryString["ApplicationId"]);
            applicationModel.ApplicationId = Convert.ToInt32(ApplicationNameDDList.SelectedValue);

            string    user   = (string)Session["user"];
            var       client = new FormManagmentServiceClient();
            FormModel form   = new FormModel
            {
                FormName     = txtBoxFormName.Text,
                FormCategory = txtBoxCategory.Text
            };

            string str = client.AddNewForm(form, applicationModel, user);

            //LabelRetunMessage.Text = str;
            FormListGridView.DataSource = client.ListForms(Convert.ToInt32(ApplicationNameDDList.SelectedValue));
            FormListGridView.DataBind();
            txtBoxFormName.Text = "";
            txtBoxCategory.Text = "";
        }