• 后台调用存储过程


     1 public JsonResult GetResult(string p_account_month_to)
     2 
     3 {
     4 
     5 SqlParameter[] param =
     6 
     7 {
     8 
     9 new SqlParameter("@p_org_info_id ", SqlDbType.Int),
    10 
    11 new SqlParameter("@p_customer_info_id ", SqlDbType.Int),
    12 
    13 new SqlParameter("@p_account_month_from", SqlDbType.VarChar, 6),
    14 
    15 new SqlParameter("@p_account_month_to", SqlDbType.VarChar, 6),
    16 
    17 new SqlParameter("@p_user_name", SqlDbType.VarChar, 50),
    18 
    19 new SqlParameter("@p_feedback", SqlDbType.VarChar, 500)
    20 
    21 };
    22 
    23 param[0].Value = base.org_info_id;
    24 
    25 param[1].Value = base.customer_info_id;
    26 
    27 param[2].Value = "";
    28 
    29 param[3].Value = p_account_month_to;
    30 
    31 param[4].Value = base.userName;
    32 
    33 param[5].Direction = ParameterDirection.Output;//返回的值
    34 
    35 using (EFContext context = new EFContext())
    36 
    37 {
    38 
    39 var results =
    40 
    41 context.Database.ExecuteSqlCommand(
    42 
    43 "fm_init_opening_balance @p_org_info_id,@p_customer_info_id ,@p_account_month_from,@p_account_month_to,@p_user_name,@p_feedback output",
    44 
    45 param[0], param[1], param[2], param[3], param[4], param[5]);
    46 
    47 context.Dispose();
    48 
    49 }
    50 
    51 var msg = param[5].Value;
    52 
    53 return Json(msg, JsonRequestBehavior.AllowGet);
  • 相关阅读:
    P4556 [Vani有约会]雨天的尾巴(线段树合并)
    bzoj3590: [Snoi2013]Quare
    P3187 [HNOI2007]最小矩形覆盖
    对文件中的名字进行随机抽选(小脚本)
    用shell编写一个三角形图案
    HUE安装与使用
    史上最全CentOS6离线安装部署Cloudera Manager5.9.3
    ReLU 函数
    关于反向传播
    关于微分
  • 原文地址:https://www.cnblogs.com/guess/p/6168801.html
Copyright © 2020-2023  润新知