internal Api_Mjld_SubmitOrder_output GetApi_Mjld_SubmitOrder_output(int orderid) { string sql = "select * from api_mjld_SubmitOrder_output where orderid=" + orderid; var cmd = sqlHelper.PrepareTextSqlCommand(sql); using (var reader = cmd.ExecuteReader()) { Api_Mjld_SubmitOrder_output m = null; if (reader.Read()) { m = new Api_Mjld_SubmitOrder_output { id = reader.GetValue <int>("id"), timeStamp = reader.GetValue <string>("timeStamp"), mjldOrderId = reader.GetValue <string>("mjldOrderId"), endTime = reader.GetValue <string>("endTime"), credence = reader.GetValue <string>("credence"), inCount = reader.GetValue <string>("inCount"), status = reader.GetValue <int>("status"), orderId = reader.GetValue <int>("orderId"), }; } return(m); } }
public int EditApi_Mjld_SubmitOrder_output(Api_Mjld_SubmitOrder_output m) { using (var helper = new SqlHelper()) { int r = new Internalapi_mjld_SubmitOrder_output(helper).EditApi_Mjld_SubmitOrder_output(m); return(r); } }
public string ReSendSms(ApiService mapiservice, Api_Mjld_SubmitOrder_output moutput) { string xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" + "<Body>" + "<timeStamp>" + CommonFunc.ConvertDateTimeInt(DateTime.Now).ToString() + "</timeStamp>" + "<user>" + mapiservice.Servicername + "</user>" + "<password>" + mapiservice.Password + "</password>" + "<orderId>" + moutput.mjldOrderId + "</orderId>" + "<credenceno>" + moutput.credence + "</credenceno>" + "</Body>"; string data = HttpUtility.UrlEncode(Mjld_TCodeServiceCrypt.Encrypt3DESToBase64(xml, mapiservice.Deskey)); string postData = string.Format("businessid={1}&content={0}", data, mapiservice.Organization); string str = POST(interurl + "ReSendSms", postData); string bstr = "fail"; try { bstr = Mjld_TCodeServiceCrypt.Decrypt3DESFromBase64(str, mapiservice.Deskey); } catch { bstr += " " + str; } //录入交互日志 ApiLog mapilog = new ApiLog { Id = 0, request_type = "ReSendSms", Serviceid = 3, Str = xml.Trim(), Subdate = DateTime.Now, ReturnStr = bstr, ReturnSubdate = DateTime.Now, Errmsg = "", }; int ins = new ApiLogData().EditLog(mapilog); return(bstr); }
internal int EditApi_Mjld_SubmitOrder_output(Api_Mjld_SubmitOrder_output m) { if (m.id > 0) { return(0); } else { string sql = @"INSERT [api_mjld_SubmitOrder_output] ([timeStamp] ,[mjldOrderId] ,[endTime] ,[credence] ,[inCount] ,[status] ,[orderId]) VALUES (@timeStamp ,@mjldOrderId ,@endTime ,@credence ,@inCount ,@status ,@orderId);select @@identity;"; var cmd = sqlHelper.PrepareTextSqlCommand(sql); cmd.AddParam("@timeStamp", m.timeStamp); cmd.AddParam("@mjldOrderId", m.mjldOrderId); cmd.AddParam("@endTime", m.endTime); cmd.AddParam("@credence", m.credence); cmd.AddParam("@inCount", m.inCount); cmd.AddParam("@status", m.status); cmd.AddParam("@orderId", m.orderId); object o = cmd.ExecuteScalar(); return(int.Parse(o.ToString())); } }