protected void btnsave_Click(object sender, EventArgs e) { if (list_add_association.Count == 0 && list_delete_association.Count == 0) { UCModalError1.ShowMessageError = "ไม่ข้อมูลการทำรายการของคุณ"; UCModalError1.ShowModalError(); } else { var res = biz.AddAssocitionApplove(list_add_association, list_delete_association, base.UserId);// ModalPopup.Hide(); GvCheckDoc.DataSource = biz.SelectApploveDocumentType("").DataResponse; GvCheckDoc.DataBind(); if (res.IsError) { UCModalError1.ShowMessageError = "บันทึกข้อมูลไม่สำเร็จ"; UCModalError1.ShowModalError(); } else { UCModalSuccess1.ShowMessageSuccess = "บันทึกข้อมูลสำเร็จ"; UCModalSuccess1.ShowModalSuccess(); } } }
private void BindGrid() { GvCheckDoc.DataSource = biz.SelectApploveDocumentType("").DataResponse; GvCheckDoc.DataBind(); ddlAsso.DataSource = biz.SelectAsso("").DataResponse; ddlAsso.DataBind(); ddlAsso.Items.Add(new ListItem("--เลือกสมาคม--", "")); ddlAsso.SelectedValue = ""; }