public void make_table_loading(string dbname, string ID) { ViewState["edit_count"] = 0; DAL.PriceAnalysis PA = new DAL.PriceAnalysis(); string[] result = PA.SelectByID(dbname, Convert.ToInt32(ID)); if (result[1] == "1") { TB_PriceName.Text = result[0]; DDL_Unit.SelectedValue = result[2]; TB_AnaNum.Text = result[5]; string[] PriceList = Utility.str_process.str2array(result[3]); string[] NumberList = Utility.str_process.str2array(result[4]); Session["PriceName"] = result[3]; Session["PriceNumber"] = result[4]; if (result[3] != null) { for (int i = 0; i < PriceList.Length; i++) { make_row(PriceList[i], NumberList[i]); } } } else { TB_PriceName.Text = result[0]; DDL_Unit.SelectedValue = result[2]; TB_AnaNum.Text = result[5]; } }
public void make_table(string dbname, string ID, string PriceName, string PriceNumber) { ViewState["edit_count"] = 0; DAL.PriceAnalysis PA = new DAL.PriceAnalysis(); string[] original_result = PA.SelectByID(dbname, Convert.ToInt32(ID)); if (original_result[3] != null) { if (original_result[1] == "1") { TB_PriceName.Text = original_result[0]; DDL_Unit.SelectedValue = original_result[2]; TB_AnaNum.Text = original_result[5]; string[] PriceList = Utility.str_process.str2array(PriceName); string[] NumberList = Utility.str_process.str2array(PriceNumber); for (int i = 0; i < PriceList.Length; i++) { make_row(PriceList[i], NumberList[i]); } } else { Response.Write("<script>alert('此項目非拆工拆料項!');</script>"); } } }