protected void ddlSecondCat_SelectedIndexChanged(object sender, EventArgs e) { LineSearchInfo model = CurrentSearchInfo; model.SecondID = ddlSecondCat.SelectedValue.ToArrowInt(); LineSearch.GoSearch(model); }
protected void Page_Load(object sender, EventArgs e) { string type = Request.QueryString["Type"].ToArrowString(); switch (type.ToLower()) { case "line": int id = Request.QueryString["id"].ToArrowInt(); string date = Request.QueryString["date"]; DateTime dt = date.ToArrowDateTime(); List <TMS.TravelGroupInfo> groups = new TMS.TravelGroup().SelectList("IsDel=0 And LineID=" + id + " Order By GoDate"); var model = groups.Find(s => s.GoDate == dt); if (model != null) { Response.Redirect("LineDetail.aspx?ID=" + id + "&GroupID=" + model.ID); } else { Response.Redirect("Default.aspx"); } break; case "promotion": int id1 = Request.QueryString["id"].ToArrowInt(); DateTime date1 = Request.QueryString["date"].ToArrowDateTime(); int promotionID = Request.QueryString["PromotionID"].ToArrowInt(); int lineID = Request.QueryString["LineID"].ToArrowInt(); List <TMS.V_Promotion_GroupInfo> promotionGroups = new TMS.V_Promotion_Group().SelectList("IsDel=0 And PromotionID=" + promotionID + " And LineID=" + lineID); var model1 = promotionGroups.Find(s => s.GoDate == date1); if (model1 != null) { Response.Redirect("PromotionGroupDetail.aspx?ID=" + id1 + "&PromotionID=" + promotionID + "&GroupID=" + model1.GroupID + "&LineID=" + lineID); } else { Response.Redirect("Default.aspx"); } break; case "search": string keywords = Request["keywords"].ToArrowString(); if (!string.IsNullOrEmpty(keywords)) { LineSearchInfo searchModel = new LineSearchInfo(); searchModel.KeyWord = keywords; LineSearch.GoSearch(searchModel); } Response.Redirect("Line.aspx"); break; default: Response.Redirect("Default.aspx"); break; } }
protected void btnReset_Click(object sender, EventArgs e) { LineSearchInfo model = CurrentSearchInfo; model.KeyWord = ""; model.MinGoDate = GlobalSetting.MinTime; model.MaxGoDate = GlobalSetting.MinTime; model.MinCustomPrice = 0M; model.MaxCustomPrice = 0M; LineSearch.GoSearch(model); }
protected void btnSearch_Click(object sender, EventArgs e) { string keyword = Request.Form["keyword"].ToArrowString().Trim(); DateTime cdate1 = Request.Form["cdate1"].ToArrowDateTime(GlobalSetting.MinTime); DateTime cdate2 = Request.Form["cdate2"].ToArrowDateTime(GlobalSetting.MinTime); decimal cprice1 = Request.Form["cprice1"].ToArrowDecimal(); decimal cprice2 = Request.Form["cprice2"].ToArrowDecimal(); LineSearchInfo model = CurrentSearchInfo; if (cprice1 > 0 || cprice2 > 0) { model.FixPrice = 0; } model.KeyWord = keyword; model.MinGoDate = cdate1; model.MaxGoDate = cdate2; model.MaxCustomPrice = cprice2; model.MinCustomPrice = cprice1; LineSearch.GoSearch(model); }