using System; using CoreSavingLibrary; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data; namespace Saving.CriteriaIReport.u_cri_coopid_date_sharestk { public partial class DsMain : DataSourceFormView { public DataSet1.DataTable1DataTable DATA { get; set; } public void InitDsMain(PageWeb pw) { css1.Visible = false; DataSet1 ds = new DataSet1(); this.DATA = ds.DataTable1; this.EventItemChanged = "OnDsMainItemChanged"; this.EventClicked = "OnDsMainClicked"; this.InitDataSource(pw, FormView1, this.DATA, "dsMain"); this.Register(); } public void DdCoopId() { String sql = @" SELECT COOP_ID, COOP_NAME FROM CMCOOPMASTER "; sql = WebUtil.SQLFormat(sql); DataTable dt = WebUtil.Query(sql); this.DropDownDataBind(dt, "coop_id", "coop_name", "coop_id"); } public void Ddstart_type() { String sql = @"SELECT a.* FROM(select coop_id,depttype_code, CONCAT(CONCAT(depttype_code,'-'),depttype_desc) as display, depttype_desc,1 as sorter from dpdepttype union select ''as coop_id,''as depttype_code,''as display,''as depttype_desc,0 as sorter from dual)a order by a.sorter,a.depttype_code"; sql = WebUtil.SQLFormat(sql); DataTable dt = WebUtil.Query(sql); this.DropDownDataBind(dt, "as_start_type", "display", "depttype_code"); } public void Ddend_type() { String sql = @"SELECT a.* FROM(select coop_id,depttype_code, CONCAT(CONCAT(depttype_code,'-'),depttype_desc) as display, depttype_desc,1 as sorter from dpdepttype union select ''as coop_id,''as depttype_code,''as display,''as depttype_desc,0 as sorter from dual)a order by a.sorter,a.depttype_code"; sql = WebUtil.SQLFormat(sql); DataTable dt = WebUtil.Query(sql); this.DropDownDataBind(dt, "as_end_type", "display", "depttype_code"); } } }