Exemple #1
0
        public async Task <IEnumerable <Ac_Mtr_Agreement_Product_Info_Detail> > List(Ac_Mtr_Agreement_Product_Info_Detail model)
        {
            using (var connection = new SqlConnection(ConnectionString))
            {
                var result = connection.Query <Common.Ac_Mtr_Agreement_Product_Info_Detail>

                                 ("PA_CON_AC_MTR_AGREEMENT_DETAILS_RESULT_GET",
                                 param: new
                {
                    P_PK_AC_TRADE_AGREEMENT = model.Pk_Ac_Trade_Agreement,
                    // P_PK_CAT_AGREEMENT_DETAILS_RESUME = model.Pk_Cat_Agreement_Details_Resume,
                    P_BEHAVIOR    = model.Behavior,
                    P_PRODUCT_ID  = model.Product_Id,
                    P_PAGE_NUMBER = model.Page_Number,
                    P_ROWS_PAGE   = model.Rows_Page,
                    P_SEARCH_TEXT = model.Search_Text
                },
                                 commandType: CommandType.StoredProcedure);
                return(await Task.FromResult <IEnumerable <Ac_Mtr_Agreement_Product_Info_Detail> >(result.ToList()));
            }
        }
Exemple #2
0
 public async Task <IEnumerable <Ac_Mtr_Agreement_Product_Info_Detail> > DeleteScalar(Ac_Mtr_Agreement_Product_Info_Detail model)
 {
     using (var connection = new SqlConnection(ConnectionString))
     {
         var result = connection.Query <
             Common.Ac_Mtr_Agreement_Product_Info_Detail>
                          ("PA_CON_AC_MTR_AGREEMENT_DETAILS_RESULT_DELETE",
                          param: new
         {
             P_PK_CAT_AGREEMENT_DETAILS_RESUME = model.Pk_Cat_Agreement_Details_Resume,
             P_PK_AC_TRADE_AGREEMENT           = model.Pk_Ac_Trade_Agreement
         },
                          commandType: CommandType.StoredProcedure);
         return(await Task.FromResult <IEnumerable <Ac_Mtr_Agreement_Product_Info_Detail> >(result.ToList()));
     }
 }