public string GetParameterValue(DbCommand com, string name) { string returnedValue; returnedValue = Db.GetParameterValue(com, name).ToString(); return(returnedValue); }
/// <summary> /// 确认订单变更 /// </summary> /// <param name="id">变更编号</param> /// <param name="surePersonId">确认人编号</param> /// <param name="surePerson">确认人</param> /// <returns></returns> public int UpdateTourOrderChange(string id, string surePersonId, string surePerson) { DbCommand cmd = _db.GetStoredProcCommand("proc_TourOrderChange_Update"); _db.AddInParameter(cmd, "Id", DbType.AnsiStringFixedLength, id); _db.AddInParameter(cmd, "SurePersonId", DbType.AnsiStringFixedLength, surePersonId); _db.AddInParameter(cmd, "SurePerson", DbType.String, surePerson); _db.AddOutParameter(cmd, "Result", DbType.Int32, 4); DbHelper.RunProcedureWithResult(cmd, _db); return(Convert.ToInt32(_db.GetParameterValue(cmd, "Result"))); }
//操作中——销售未派计划 //已落实——计调配置完毕 /// <summary> ///1:添加成功 ///0:添加失败 /// </summary> /// <param name="single">单项业务的实体</param> /// <returns></returns> public int AddSingleService(MSingleServiceExtend single) { string tourId = string.IsNullOrEmpty(single.TourId) ? Guid.NewGuid().ToString() : single.TourId; string OrderId = string.IsNullOrEmpty(single.OrderId) ? Guid.NewGuid().ToString() : single.OrderId; string travellerXML = string.Empty;//游客信息 if (single.TourOrderTravellerList != null) { travellerXML = CreateTourOrderTravellerXml(single.TourOrderTravellerList, OrderId);//游客信息 } string teamPriceXMl = string.Empty;//客人要求(分项报价) if (single.TourTeamPriceList != null) { teamPriceXMl = CreateTourTeamPriceXml(tourId, single.TourTeamPriceList); } string planXML = string.Empty;//供应商安排 if (single.PlanBaseInfoList != null) { planXML = CreatePlanBaseInfoXml(tourId, single.CompanyId, single.OperatorDeptId, single.PlanBaseInfoList); } string planerXML = string.Empty;//计调员信息 if (single.TourPlanersList != null) { planerXML = CreateTourPlanerXML(tourId, single.TourPlanersList); } DbCommand cmd = _db.GetStoredProcCommand("proc_TourOrder_Add_SingleService"); _db.AddInParameter(cmd, "TourId", DbType.AnsiStringFixedLength, tourId); _db.AddInParameter(cmd, "TourCode", DbType.String, single.TourCode); _db.AddInParameter(cmd, "OrderId", DbType.AnsiStringFixedLength, OrderId); _db.AddInParameter(cmd, "OrderCode", DbType.String, single.OrderCode); _db.AddInParameter(cmd, "CompanyId", DbType.AnsiStringFixedLength, single.CompanyId); _db.AddInParameter(cmd, "BuyCompanyName", DbType.String, single.BuyCompanyName); _db.AddInParameter(cmd, "BuyCompanyId", DbType.AnsiStringFixedLength, single.BuyCompanyId); _db.AddInParameter(cmd, "ContactDepartId", DbType.String, single.ContactDepartId); _db.AddInParameter(cmd, "ContactName", DbType.String, single.ContactName); _db.AddInParameter(cmd, "ContactTel", DbType.String, single.ContactTel); _db.AddInParameter(cmd, "Adults", DbType.Int32, single.Adults); _db.AddInParameter(cmd, "SellerId", DbType.AnsiStringFixedLength, single.SellerId); _db.AddInParameter(cmd, "SellerName", DbType.String, single.SellerName); _db.AddInParameter(cmd, "DeptId", DbType.String, single.DeptId);//销售员部门编号 _db.AddInParameter(cmd, "OperatorId", DbType.AnsiStringFixedLength, single.OperatorId); _db.AddInParameter(cmd, "Operator", DbType.String, single.Operator); _db.AddInParameter(cmd, "TourIncome", DbType.Currency, single.TourIncome); _db.AddInParameter(cmd, "TourPay", DbType.Currency, single.TourPay);//合计支出 _db.AddInParameter(cmd, "TourProfit", DbType.Currency, single.TourProfit); _db.AddInParameter(cmd, "TravellerFile", DbType.String, single.TravellerFile); _db.AddInParameter(cmd, "TourStatus", DbType.Byte, (int)single.TourStatus);//计划状态 _db.AddInParameter(cmd, "MTourOrderTraveller", DbType.String, travellerXML); _db.AddInParameter(cmd, "MTourTeamPrice", DbType.String, teamPriceXMl); _db.AddInParameter(cmd, "MPlanBaseInfo", DbType.String, planXML); _db.AddInParameter(cmd, "MTourPlaner", DbType.String, planerXML); _db.AddOutParameter(cmd, "Result", DbType.Int32, 4); _db.AddInParameter(cmd, "WeiTuoRiQi", DbType.DateTime, single.WeiTuoRiQi); _db.AddInParameter(cmd, "HeTongId", DbType.AnsiStringFixedLength, single.HeTongId); _db.AddInParameter(cmd, "XuHao", DbType.Int32, single.XuHao); DbHelper.RunProcedureWithResult(cmd, _db); return(Utils.GetInt(_db.GetParameterValue(cmd, "Result").ToString(), 4)); }