public void Insert_LowFare(Entity.LowFare o_LowFare) { if (o_LowFare == null) return; Entity.LowFare e_LowFare = new Entity.LowFare(); e_LowFare.LowFare_ID = o_LowFare.LowFare_ID; e_LowFare.LowFare_Type = o_LowFare.LowFare_Type; e_LowFare.LowFare_Detail_ID = o_LowFare.LowFare_Detail_ID; e_LowFare.LowFare_Adults = o_LowFare.LowFare_Adults; e_LowFare.LowFare_Children = o_LowFare.LowFare_Children; e_LowFare.LowFare_Infants = o_LowFare.LowFare_Infants; e_LowFare.LowFare_Passengers = FilterUtility.FilterSQL(o_LowFare.LowFare_Passengers); e_LowFare.LowFare_Airline = FilterUtility.FilterSQL(o_LowFare.LowFare_Airline); e_LowFare.LowFare_Class = FilterUtility.FilterSQL(o_LowFare.LowFare_Class); e_LowFare.LowFare_Member_ID = o_LowFare.LowFare_Member_ID; e_LowFare.LowFare_AdminUser_ID = o_LowFare.LowFare_AdminUser_ID; e_LowFare.LowFare_Status = o_LowFare.LowFare_Status; e_LowFare.LowFare_AddTime = o_LowFare.LowFare_AddTime; e_LowFare.LowFare_SubmitTime = o_LowFare.LowFare_SubmitTime; BLL.LowFare_Detail b_LowFare_Detail = new LowFare_Detail(); b_LowFare_Detail.Insert_LowFare_Detail(e_LowFare.LowFare_Detail_ID); d_LowFare.Insert_LowFare(e_LowFare); }
public Entity.LowFare[] Select_LowFare(string p_Search_Content, int p_Search_Method, int p_LowFare_Status, int p_PageSize, int p_PageIndex) { switch (p_Search_Method) { case 7: { BLL.Member b_Member = new Member(); Entity.Member o_Member = b_Member.Select_Member(1, p_Search_Content); if (o_Member != null) p_Search_Content = o_Member.Member_ID.ToString(); else return null; } break; case 8: { BLL.Member b_Member = new Member(); Entity.Member o_Member = b_Member.Select_Member(2, p_Search_Content); if (o_Member != null) p_Search_Content = o_Member.Member_ID.ToString(); else return null; } break; } DataTable o_DataTable = d_LowFare.Select_LowFare(p_Search_Content, p_Search_Method, p_LowFare_Status, p_PageSize, p_PageIndex, ref g_TotalCount, ref g_TotalPage); if (o_DataTable == null) return null; else { Entity.LowFare[] e_LowFare = new Entity.LowFare[o_DataTable.Rows.Count]; int i = 0; foreach (DataRow o_DataRow in o_DataTable.Rows) { e_LowFare[i] = new Entity.LowFare(); DateRow_LowFare(o_DataRow, e_LowFare[i]); i++; } return e_LowFare; } }
public Entity.LowFare Select_LowFare(int p_LowFare_ID) { DataTable o_DataTable = d_LowFare.Select_LowFare(p_LowFare_ID, ref g_TotalCount, ref g_TotalPage); if (o_DataTable == null) return null; else { DataRow o_DataRow = o_DataTable.Rows[0]; Entity.LowFare e_LowFare = new Entity.LowFare(); DateRow_LowFare(o_DataRow, e_LowFare); return e_LowFare; } }