//添加订单流水信息 private void addWaterBill(string orderId, string depositMoney) { TM_WaterBill waterBill = new TM_WaterBill(); waterBill.BiId = Guid.NewGuid(); waterBill.UBId = getUserId(); TM_OrderListBiz orderListBiz = new TM_OrderListBiz(); DataSet result = orderListBiz.ExecuteSqlToDataSet("EXEC [TireMoneyDB].[dbo].[proc_GetOrderIdByWeixinId] '"+ GetUData.OpenId + "'"); waterBill.FId = (Guid)result.Tables[0].Rows[0][0]; waterBill.NCode = orderId; waterBill.WMney = decimal.Parse(depositMoney); //waterBill.Platform //waterBill.BType=ConstantList.WATER_BILL_TYPE_RECEIVE //TODO 类型与平台? DateTime now = DateTime.ParseExact(GetUData.Timestamp, "yyyyMMddHHmmss", null); waterBill.Years = (short)now.Year; waterBill.Months = (byte)now.Month; waterBill.Days = now.Month + "-" + now.Day; waterBill.Weeks = now.DayOfWeek.ToString(); waterBill.CreateTime = DateTime.Now; waterBill.isDeleted = false; TM_WaterBillBiz waterBillBiz = new TM_WaterBillBiz(); waterBillBiz.Add(waterBill); }
public JsonResult GetInfo(string ID) { var mql2 = TM_WaterBillSet.SelectAll().Where(TM_WaterBillSet.BiId.Equal(ID)); TM_WaterBill Rmodel = OPBiz.GetEntity(mql2); // groupsBiz.Add(rol); return(Json(Rmodel, JsonRequestBehavior.AllowGet)); }
public JsonResult EditInfo(TM_WaterBill EidModle) { HttpReSultMode ReSultMode = new HttpReSultMode(); bool IsAdd = false; if (!(EidModle.BiId != null && !EidModle.BiId.ToString().Equals("00000000-0000-0000-0000-000000000000"))) //id为空,是添加 { IsAdd = true; EidModle.CreateTime = DateTime.Now; EidModle.isDeleted = false; } if (IsAdd) { try { OPBiz.Add(EidModle); ReSultMode.Code = 11; ReSultMode.Data = EidModle.BiId.ToString(); ReSultMode.Msg = "添加成功"; } catch (Exception e) { ReSultMode.Code = -11; ReSultMode.Data = e.ToString(); ReSultMode.Msg = "添加失败"; } } else { EidModle.WhereExpression = TM_WaterBillSet.BiId.Equal(EidModle.BiId); string idfilec = "BiId"; EidModle.ChangedMap.Remove(idfilec.ToLower());//移除主键值 if (OPBiz.Update(EidModle) > 0) { ReSultMode.Code = 11; ReSultMode.Data = ""; ReSultMode.Msg = "修改成功"; } else { ReSultMode.Code = -13; ReSultMode.Data = ""; ReSultMode.Msg = "修改失败"; } } return(Json(ReSultMode, JsonRequestBehavior.AllowGet)); }