using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using CoreSavingLibrary; using System.Data; using DataLibrary; namespace Saving.Applications.trading.ws_td_account_ctrl { public partial class DsMain : DataSourceRepeater { Sdt dt = new Sdt(); public DataSet1.DataTable1DataTable DATA { get; set; } public void InitdsMain(PageWeb pw) { css1.Visible = false; css2.Visible = false; DataSet1 ds = new DataSet1(); this.DATA = ds.DataTable1; this.InitDataSource(pw, Repeater1, this.DATA, "dsMain"); this.EventClicked = "OnDsMainClicked"; this.Button.Add("b_del"); this.Register(); } public void Retrieve(string coopid,string storeid) { if (storeid != "002") { string sql = @"select producttype_code from stproducttype where coop_id ='" + coopid + "' and productgroup_code ='" + storeid + "'"; sql = WebUtil.SQLFormat(sql); DataTable dt = WebUtil.Query(sql); this.ImportData(dt); } else { string sql = @"select producttype_code from stproductmaster where coop_id ='" + coopid + "' and productgroup_code ='" + storeid + "' group by producttype_code"; sql = WebUtil.SQLFormat(sql); DataTable dt = WebUtil.Query(sql); this.ImportData(dt); } } /* public void Getaccid_cash(string posttofin) { if (posttofin == "0") { string sql = "select (account_id||' - '||account_name) as account from accmaster where account_type_id ='3' and coop_id ='000501' order by account_id"; DataTable dt = WebUtil.Query(sql); this.(dt, "accid_cash", "account", "account"); } else { string sql = "select accid_cash from stproductmaster where productgroup_code ='002' and coop_id=" + state.SsCoopId + ""; DataTable dt = WebUtil.Query(sql); this.DropDownDataBind(dt, "accid_cash", "", "accid_cash"); } } public void Getaccid_loanbuy(string posttofin) { if (posttofin == "0") { string sql = "select (account_id||' - '||account_name) as account from accmaster where account_type_id ='3' and coop_id ='000501' order by account_id"; DataTable dt = WebUtil.Query(sql); this.DropDownDataBind(dt, "accid_loanbuy", "", "account"); } else { string sql = "select accid_loanbuy from stproductmaster where productgroup_code ='002' and coop_id=" + state.SsCoopId + ""; DataTable dt = WebUtil.Query(sql); this.DropDownDataBind(dt, "accid_loanbuy", "", "accid_loanbuy"); } } public void Getaccid_loansale(string posttofin) { if (posttofin == "0") { string sql = "select (account_id||' - '||account_name) as account from accmaster where account_type_id ='3' and coop_id ='000501' order by account_id"; DataTable dt = WebUtil.Query(sql); this.DropDownDataBind(dt, "accid_loansale", "", "account"); } else { string sql = "select accid_loansale from stproductmaster where productgroup_code ='002' and coop_id=" + state.SsCoopId + ""; DataTable dt = WebUtil.Query(sql); this.DropDownDataBind(dt, "accid_loansale", "", "accid_loansale"); } } public void Getaccid_buy(string posttofin) { if (posttofin == "0") { string sql = "select (account_id||' - '||account_name) as account from accmaster where account_type_id ='3' and coop_id ='000501' order by account_id"; DataTable dt = WebUtil.Query(sql); this.DropDownDataBind(dt, "accid_buy", "", "account"); } else { string sql = "select accid_buy from stproductmaster where productgroup_code ='002' and coop_id=" + state.SsCoopId + ""; DataTable dt = WebUtil.Query(sql); this.DropDownDataBind(dt, "accid_buy", "", "accid_buy"); } } public void Getaccid_sale(string posttofin) { if (posttofin == "0") { string sql = "select (account_id||' - '||account_name) as account from accmaster where account_type_id ='3' and coop_id ='000501' order by account_id"; DataTable dt = WebUtil.Query(sql); this.DropDownDataBind(dt, "accid_sale", "", "account"); } else { string sql = "select accid_sale from stproductmaster where productgroup_code ='002' and coop_id=" + state.SsCoopId + ""; DataTable dt = WebUtil.Query(sql); this.DropDownDataBind(dt, "accid_sale", "", "accid_sale"); } } public void Getaccid_receive(string posttofin) { if (posttofin == "0") { string sql = "select (account_id||' - '||account_name) as account from accmaster where account_type_id ='3' and coop_id ='000501' order by account_id"; DataTable dt = WebUtil.Query(sql); this.DropDownDataBind(dt, "accid_receive", "", "account"); } else { string sql = "select accid_receive from stproductmaster where productgroup_code ='002' and coop_id=" + state.SsCoopId + ""; DataTable dt = WebUtil.Query(sql); this.DropDownDataBind(dt, "accid_receive", "", "accid_receive"); } } public void Getaccid_sent(string posttofin) { if (posttofin == "0") { string sql = "select (account_id||' - '||account_name) as account from accmaster where account_type_id ='3' and coop_id ='000501' order by account_id"; DataTable dt = WebUtil.Query(sql); this.DropDownDataBind(dt, "accid_sent", "", "account"); } else { string sql = "select accid_sent from stproductmaster where productgroup_code ='002' and coop_id=" + state.SsCoopId + ""; DataTable dt = WebUtil.Query(sql); this.DropDownDataBind(dt, "accid_sent", "", "accid_sent"); } } public void Getaccid_vat(string posttofin) { if (posttofin == "0") { string sql = "select (account_id||' - '||account_name) as account from accmaster where account_type_id ='3' and coop_id ='000501' order by account_id"; DataTable dt = WebUtil.Query(sql); this.DropDownDataBind(dt, "accid_vat", "", "account"); } else { string sql = "select accid_vat from stproductmaster where productgroup_code ='002' and coop_id=" + state.SsCoopId + ""; DataTable dt = WebUtil.Query(sql); this.DropDownDataBind(dt, "accid_vat", "", "accid_vat"); } } public void Getaccid_invat(string posttofin) { if (posttofin == "0") { string sql = "select (account_id||' - '||account_name) as account from accmaster where account_type_id ='3' and coop_id ='000501' order by account_id"; DataTable dt = WebUtil.Query(sql); this.DropDownDataBind(dt, "accid_invat", "", "account"); } else { string sql = "select accid_invat from stproductmaster where productgroup_code ='002' and coop_id=" + state.SsCoopId + ""; DataTable dt = WebUtil.Query(sql); this.DropDownDataBind(dt, "accid_invat", "", "accid_invat"); } } public void Getaccid_outvat(string posttofin) { if (posttofin == "0") { string sql = "select (account_id||' - '||account_name) as account from accmaster where account_type_id ='3' and coop_id ='000501' order by account_id"; DataTable dt = WebUtil.Query(sql); this.DropDownDataBind(dt, "accid_outvat", "", "account"); } else { string sql = "select accid_outvat from stproductmaster where productgroup_code ='002' and coop_id=" + state.SsCoopId + ""; DataTable dt = WebUtil.Query(sql); this.DropDownDataBind(dt, "accid_outvat", "", "accid_outvat"); } }*/ } }