private void GetList()
    {
        Database_Output_SaleShop_profits_qyjl_log_Result c = (Database_Output_SaleShop_profits_qyjl_log_Result)Page.LoadControl("SaleShop_profits_qyjl_log_Result.ascx");

        DO_SaleShop_profits_qyjl_log.UO_SaleShop_profits_qyjl_log l = new DO_SaleShop_profits_qyjl_log.UO_SaleShop_profits_qyjl_log();
        GetTogether.Web.WebHelper.SetValues <DO_SaleShop_profits_qyjl_log.UO_SaleShop_profits_qyjl_log>(l, "SaleShop_profits_qyjl_log_");
        if (string.IsNullOrEmpty(Sort))
        {
            Sort = DO_SaleShop_profits_qyjl_log.Columns.id.ToString();
        }
        PagingResult <DO_SaleShop_profits_qyjl_log.UO_SaleShop_profits_qyjl_log, DO_SaleShop_profits_qyjl_log.UOList_SaleShop_profits_qyjl_log> resultPaging = BO_SaleShop_profits_qyjl_log.GetPagingList(l, PageIndex, PageSize, Sort, IsAsc);

        c.JsFunction = "SaleShop_profits_qyjl_log_Search";
        c.SetData <DO_SaleShop_profits_qyjl_log.UO_SaleShop_profits_qyjl_log, DO_SaleShop_profits_qyjl_log.UOList_SaleShop_profits_qyjl_log>(resultPaging.Result);
        c.Total     = resultPaging.Total;
        c.Sort      = Sort;
        c.PageIndex = PageIndex;
        c.PageSize  = PageSize;
        c.IsAsc     = IsAsc;
        this.Controls.Add(c);
    }
Exemple #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Int32 id = 0;

        if (!string.IsNullOrEmpty(Request["id"]))
        {
            id = Convert.ToInt32(Request["id"]);
        }
        if (id > 0)
        {
            UO = BO_SaleShop_profits_qyjl_log.GetObjectById(id);
        }
        if (UO == null)
        {
            UO = new DO_SaleShop_profits_qyjl_log.UO_SaleShop_profits_qyjl_log();
        }

        if (Request.Form.Keys.Count > 0)
        {
            GetTogether.Web.WebHelper.SetValues <DO_SaleShop_profits_qyjl_log.UO_SaleShop_profits_qyjl_log>(UO, "SaleShop_profits_qyjl_log_");
            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_SaleShop_profits_qyjl_log.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("SaleShop_profits_qyjl_log.aspx");
        }
    }
Exemple #3
0
        ///<summary>
        ///Get conditions by object with Multi-TokenType.
        ///</summary>
        public static ParameterCollection GetConditionsByObject(DO_SaleShop_profits_qyjl_log.UO_SaleShop_profits_qyjl_log parameterObj, bool isAnd, TokenTypes tokenTypes, Dictionary <DO_SaleShop_profits_qyjl_log.Columns, TokenTypes> extTokens)
        {
            ParameterCollection objectConditions = new ParameterCollection();
            TokenTypes          tt = tokenTypes;
            ParameterType       pt = isAnd ? ParameterType.And : ParameterType.Or;

            if (parameterObj.id != 0 || (extTokens != null && extTokens.ContainsKey(DO_SaleShop_profits_qyjl_log.Columns.id)))
            {
                objectConditions.AddCondition(pt, GetColumnTokenType(tt, DO_SaleShop_profits_qyjl_log.Columns.id, extTokens), DO_SaleShop_profits_qyjl_log.Columns.id, parameterObj.id);
            }
            if (parameterObj.uid != 0 || (extTokens != null && extTokens.ContainsKey(DO_SaleShop_profits_qyjl_log.Columns.uid)))
            {
                objectConditions.AddCondition(pt, GetColumnTokenType(tt, DO_SaleShop_profits_qyjl_log.Columns.uid, extTokens), DO_SaleShop_profits_qyjl_log.Columns.uid, parameterObj.uid);
            }
            if (!string.IsNullOrEmpty(parameterObj.orderid))
            {
                objectConditions.AddCondition(pt, GetColumnTokenType(tt, DO_SaleShop_profits_qyjl_log.Columns.orderid, extTokens), DO_SaleShop_profits_qyjl_log.Columns.orderid, parameterObj.orderid);
            }
            if (parameterObj.mshopid != 0 || (extTokens != null && extTokens.ContainsKey(DO_SaleShop_profits_qyjl_log.Columns.mshopid)))
            {
                objectConditions.AddCondition(pt, GetColumnTokenType(tt, DO_SaleShop_profits_qyjl_log.Columns.mshopid, extTokens), DO_SaleShop_profits_qyjl_log.Columns.mshopid, parameterObj.mshopid);
            }
            if (parameterObj.original_price != 0 || (extTokens != null && extTokens.ContainsKey(DO_SaleShop_profits_qyjl_log.Columns.original_price)))
            {
                objectConditions.AddCondition(pt, GetColumnTokenType(tt, DO_SaleShop_profits_qyjl_log.Columns.original_price, extTokens), DO_SaleShop_profits_qyjl_log.Columns.original_price, parameterObj.original_price);
            }
            if (parameterObj.profits_price != 0 || (extTokens != null && extTokens.ContainsKey(DO_SaleShop_profits_qyjl_log.Columns.profits_price)))
            {
                objectConditions.AddCondition(pt, GetColumnTokenType(tt, DO_SaleShop_profits_qyjl_log.Columns.profits_price, extTokens), DO_SaleShop_profits_qyjl_log.Columns.profits_price, parameterObj.profits_price);
            }
            if (parameterObj.status != 0 || (extTokens != null && extTokens.ContainsKey(DO_SaleShop_profits_qyjl_log.Columns.status)))
            {
                objectConditions.AddCondition(pt, GetColumnTokenType(tt, DO_SaleShop_profits_qyjl_log.Columns.status, extTokens), DO_SaleShop_profits_qyjl_log.Columns.status, parameterObj.status);
            }
            return(objectConditions);
        }
Exemple #4
0
 ///<summary>
 ///Update object by primary key string(with transation).
 ///</summary>
 public static bool UpdateObjectByPrimaryKeyString(DO_SaleShop_profits_qyjl_log.UO_SaleShop_profits_qyjl_log obj, string primaryKeyString, IDbConnection connection, IDbTransaction transaction)
 {
     return(obj.Update(connection, transaction, GetConditionsByPrimaryKeyString(primaryKeyString)) > 0);
 }
Exemple #5
0
 ///<summary>
 ///Update object by primary key string.
 ///</summary>
 public static bool UpdateObjectByPrimaryKeyString(DO_SaleShop_profits_qyjl_log.UO_SaleShop_profits_qyjl_log obj, string primaryKeyString)
 {
     return(obj.Update(GetConditionsByPrimaryKeyString(primaryKeyString)) > 0);
 }
Exemple #6
0
 ///<summary>
 ///Update object by primary key(with transation).
 ///</summary>
 public static bool UpdateObject(DO_SaleShop_profits_qyjl_log.UO_SaleShop_profits_qyjl_log obj, System.Int32 id, IDbConnection connection, IDbTransaction transaction)
 {
     return(obj.Update(connection, transaction, GetConditionsByPrimaryKey(id)) > 0);
 }
Exemple #7
0
 ///<summary>
 ///Update object by primary key.
 ///</summary>
 public static bool UpdateObject(DO_SaleShop_profits_qyjl_log.UO_SaleShop_profits_qyjl_log obj, System.Int32 id)
 {
     return(obj.Update(GetConditionsByPrimaryKey(id)) > 0);
 }
Exemple #8
0
 ///<summary>
 ///Get paging list.
 ///</summary>
 public static PagingResult <DO_SaleShop_profits_qyjl_log.UO_SaleShop_profits_qyjl_log, DO_SaleShop_profits_qyjl_log.UOList_SaleShop_profits_qyjl_log> GetPagingList(DO_SaleShop_profits_qyjl_log.UO_SaleShop_profits_qyjl_log parameterObj, int pageNumber, int pageSize, string sortBy, bool isAsc)
 {
     return(parameterObj.GetPagingList(GetConditionsByObject(parameterObj, true, TokenTypes.Like, null), pageNumber, pageSize, sortBy, isAsc));
 }
Exemple #9
0
 ///<summary>
 ///Get paging list.
 ///</summary>
 public static PagingResult <DO_SaleShop_profits_qyjl_log.UO_SaleShop_profits_qyjl_log, DO_SaleShop_profits_qyjl_log.UOList_SaleShop_profits_qyjl_log> GetPagingList(DO_SaleShop_profits_qyjl_log.UO_SaleShop_profits_qyjl_log parameterObj, int pageNumber, int pageSize, string sortBy, bool isAsc, bool isAnd, TokenTypes tokenTypes, Dictionary <DO_SaleShop_profits_qyjl_log.Columns, TokenTypes> extTokens)
 {
     return(parameterObj.GetPagingList(GetConditionsByObject(parameterObj, isAnd, tokenTypes, extTokens), pageNumber, pageSize, sortBy, isAsc));
 }
Exemple #10
0
 ///<summary>
 ///Get list by object.
 ///</summary>
 public static DO_SaleShop_profits_qyjl_log.UOList_SaleShop_profits_qyjl_log GetList(DO_SaleShop_profits_qyjl_log.UO_SaleShop_profits_qyjl_log parameterObj)
 {
     return(GetList(parameterObj, true, TokenTypes.Equal, null));
 }
Exemple #11
0
 ///<summary>
 ///Get list by object.
 ///</summary>
 public static DO_SaleShop_profits_qyjl_log.UOList_SaleShop_profits_qyjl_log GetList(DO_SaleShop_profits_qyjl_log.UO_SaleShop_profits_qyjl_log parameterObj, bool isAnd, TokenTypes tokenTypes, Dictionary <DO_SaleShop_profits_qyjl_log.Columns, TokenTypes> extTokens)
 {
     return(parameterObj.GetList(GetConditionsByObject(parameterObj, isAnd, tokenTypes, extTokens)));
 }
Exemple #12
0
        ///<summary>
        ///Get records count.
        ///</summary>
        public static int GetRecordsCount(DO_SaleShop_profits_qyjl_log.UO_SaleShop_profits_qyjl_log parameterObj, bool isAnd, TokenTypes tokenTypes, Dictionary <DO_SaleShop_profits_qyjl_log.Columns, TokenTypes> extTokens)
        {
            DO_SaleShop_profits_qyjl_log da = new DO_SaleShop_profits_qyjl_log();

            return(da.GetRecordsCount(GetConditionsByObject(parameterObj, isAnd, tokenTypes, extTokens)));
        }
Exemple #13
0
 ///<summary>
 ///Get records count.
 ///</summary>
 public static int GetRecordsCount(DO_SaleShop_profits_qyjl_log.UO_SaleShop_profits_qyjl_log parameterObj)
 {
     return(GetRecordsCount(parameterObj, true, TokenTypes.Equal, null));
 }