protected void Page_Load(object sender, EventArgs e) { Int64 id = 0; if (!string.IsNullOrEmpty(Request["id"])) { id = Convert.ToInt64(Request["id"]); } if (id > 0) { UO = BO_User_MoneyInOut.GetObjectById(id); } if (UO == null) { UO = new DO_User_MoneyInOut.UO_User_MoneyInOut(); } if (Request.Form.Keys.Count > 0) { GetTogether.Web.WebHelper.SetValues <DO_User_MoneyInOut.UO_User_MoneyInOut>(UO, "User_MoneyInOut_"); if (id > 0) { //Pending UO["UpdateOn", "yyyy-MM-dd"] = DateTime.Now.ToString("yyyy-MM-dd"); UO["UpdateBy"] = string.Concat("WS-", Request.UserHostAddress); UO.Update(BO_User_MoneyInOut.GetConditionsById(id)); } else { //Pending UO["CreateOn", "yyyy-MM-dd"] = DateTime.Now.ToString("yyyy-MM-dd"); UO["CreateBy"] = string.Concat("WS-", Request.UserHostAddress); UO.Insert(); } Response.Redirect("User_MoneyInOut.aspx"); } }
private void GetList() { Database_Output_User_MoneyInOut_Result c = (Database_Output_User_MoneyInOut_Result)Page.LoadControl("User_MoneyInOut_Result.ascx"); DO_User_MoneyInOut.UO_User_MoneyInOut l = new DO_User_MoneyInOut.UO_User_MoneyInOut(); GetTogether.Web.WebHelper.SetValues <DO_User_MoneyInOut.UO_User_MoneyInOut>(l, "User_MoneyInOut_"); if (string.IsNullOrEmpty(Sort)) { Sort = DO_User_MoneyInOut.Columns.Id.ToString(); } PagingResult <DO_User_MoneyInOut.UO_User_MoneyInOut, DO_User_MoneyInOut.UOList_User_MoneyInOut> resultPaging = BO_User_MoneyInOut.GetPagingList(l, PageIndex, PageSize, Sort, IsAsc); c.JsFunction = "User_MoneyInOut_Search"; c.SetData <DO_User_MoneyInOut.UO_User_MoneyInOut, DO_User_MoneyInOut.UOList_User_MoneyInOut>(resultPaging.Result); c.Total = resultPaging.Total; c.Sort = Sort; c.PageIndex = PageIndex; c.PageSize = PageSize; c.IsAsc = IsAsc; this.Controls.Add(c); }