/// <summary> /// 부모 패널에서 실질적인 선택이 이뤄지면 들어오는 함수 /// </summary> public void OpeningEvent(uint lowDataId, ushort amount) { ActiveCollider(false); CostGroup.SetActive(false); CardOpenEffGo.SetActive(true); TweenRotation rot = GetComponentInParent <TweenRotation>();//시작은 로테이션 rot = TweenRotation.Begin(transform.parent.gameObject, rot.duration, Quaternion.Euler(-rot.from)); rot.onFinished.Clear(); TempCoroutine.instance.FrameDelay(rot.delay + (rot.duration * 0.5f), () => { Img.spriteName = "reward_pendant_back"; ItemSlotObj.SetLowDataItemSlot(lowDataId, amount); RewardGroup.SetActive(true); CostGroup.SetActive(false); }); //EventDelegate.Set(rot.onFinished, delegate () { // ItemSlotObj.SetLowDataItemSlot(lowDataId, amount); // RewardGroup.SetActive(true); // CostGroup.SetActive(false); //}); rot.ResetToBeginning(); rot.Play(true); }
/// <summary> 보상 세팅 </summary> public void SetRewardCard(System.Action <int> _clickCallback, uint lowDataId, uint amount, int arr) { GameObject slot = Instantiate(ItemSlotPrefab) as GameObject; slot.transform.parent = RewardGroup.transform; slot.transform.localPosition = Vector3.zero; slot.transform.localScale = Vector3.one; ItemSlotObj = slot.GetComponent <InvenItemSlotObject>(); CardArray = arr; ClickCallback = _clickCallback; UIEventListener.Get(gameObject).onClick = CardClickEvent; CostGroup.SetActive(false); ActiveCollider(false); PlayTween = GetComponentInParent <UIPlayTween>(); Img.spriteName = "reward_pendant_back"; CardOpenEffGo.SetActive(false); ItemSlotObj.SetLowDataItemSlot(lowDataId, amount); CostLabel.text = string.Format("{0}", _LowDataMgr.instance.GetEtcTableValue <int>(EtcID.PassCard)); }
public BaseResponse <CostGroup> SaveCostGroup(CostGroup request) { var response = new BaseResponse <CostGroup>(); var count = unitOfWork.GetRepository <LTC_COSTGROUP>().dbSet.Count(o => o.ORGID == request.OrgId && o.ID != request.Id && (o.GROUPNAME == request.GroupName || o.GROUPNO == request.GroupNo)); if (count > 0) { response.ResultCode = 1001; //添加失败 } else { response = base.Save <LTC_COSTGROUP, CostGroup>(request, (q) => q.ID == request.Id); if (response.Data.Id > 0 && request.GroupItems != null && request.GroupItems.Count > 0) { unitOfWork.BeginTransaction(); request.GroupItems.ForEach((p) => { p.GroupId = response.Data.Id; base.Save <LTC_COSTGROUPDTL, CostGroupDtl>(p, (q) => p.Id == q.ID); }); unitOfWork.Commit(); response.ResultCode = 1002; // 保存成功 } } return(response); }
public static CostGroup CreateCostGroup(string dataAreaId, string groupId) { CostGroup costGroup = new CostGroup(); costGroup.dataAreaId = dataAreaId; costGroup.GroupId = groupId; return(costGroup); }
public static CostGroup GetCostGroup(Row row) { var costGroup = new CostGroup { Name = row["Kustannusryhmä"] }; return(costGroup); }
public IHttpActionResult Post(CostGroup baseRequest) { baseRequest.OrgId = SecurityHelper.CurrentPrincipal.OrgId; var response = service.SaveCostGroup(baseRequest); if (response.ResultCode != 1001) { response.Data.GroupItems = null; } return(Ok(response)); }
//required! public CustomRelic Initialize(string guid, string displayName, string description, string flavor, string iconFilePath, RarityType rarity, int goldCost) { name = "Custom Relic: " + displayName; Reflector.SetField(this, "m_guid", guid, typeof(Thor.DataObject)); Reflector.SetField(this, "m_displayName", CreateLocId(displayName), typeof(Thor.EntityData)); Reflector.SetField(this, "m_description", CreateLocId(description), typeof(Thor.EntityData)); Reflector.SetField(this, "m_flavor", CreateLocId(flavor), typeof(Thor.EntityData)); Reflector.SetField(this, "m_icon", CreateSprite(iconFilePath), typeof(Thor.EntityData)); Reflector.SetField(this, "m_portrait", CreateSprite(iconFilePath), typeof(Thor.EntityData)); Reflector.SetField(this, "m_rarity", rarity, typeof(Thor.EntityData)); CostGroup gcost = new CostGroup() { type = Thor.CostExt.CostType.Purchase, costs = new List <Thor.ResourceManager.Resource>() { new Thor.ResourceManager.Resource(Thor.GameData.Instance.GoldResource, goldCost) } }; Reflector.SetField(this, "m_costGroups", new List <CostGroup> { gcost }, typeof(Thor.ItemData)); return(this); }
private string GetPaymentHistoryDetail(DataRow row) { #region 获取参数并简单校验 string CommID = string.Empty; if (!row.Table.Columns.Contains("CommID")) { return(new ApiResult(false, "小区编码不能为空").toJson()); } CommID = row["CommID"].ToString(); Tb_Community community = GetCommunity(CommID); if (null == community) { return(new ApiResult(false, "未查找到小区信息").toJson()); } CommID = community.CommID; string ReceID = string.Empty; if (row.Table.Columns.Contains("OrderSN")) { ReceID = row["OrderSN"].ToString(); } PubConstant.tw2bsConnectionString = Global_Fun.Tw2bsConnectionString(Global_Fun.GetNetType(community.DBServer)); PubConstant.hmWyglConnectionString = GetConnectionStr(community); var chargeConnectionString = Global_Fun.BurstConnectionString(Convert.ToInt32(CommID), Global_Fun.BURST_TYPE_CHARGE); #endregion using (IDbConnection conn = new SqlConnection(chargeConnectionString)) { dynamic Receipts = conn.QueryFirstOrDefault("SELECT BillType,BillsDate,BillsAmount,ChargeMode FROM view_HSPR_CustomerBillSign_Filter WHERE ISNULL(IsDelete,0) = 0 AND ReceID = @ReceID", new { ReceID }); if (null == Receipts) { return(new ApiResult(false, "订单不存在").toJson()); } int BillType = Convert.ToInt32(Receipts.BillType); string BillsDate = Convert.ToString(Receipts.BillsDate); decimal BillsAmount = Convert.ToDecimal(Receipts.BillsAmount); string ChargeMode = Convert.ToString(Receipts.ChargeMode); Dictionary <string, object> result = new Dictionary <string, object>(); List <Dictionary <string, string> > FeesInfoList = new List <Dictionary <string, string> >(); if (BillType == 1) { List <dynamic> CostList = conn.Query("SELECT CostID,CostName,FeesID,FeesStateDate,FeesEndDate FROM view_HSPR_Fees_SearchFilter WHERE CommID = @CommID AND ISNULL(FeesID, 0) != 0 AND FeesID IN (SELECT FeesID FROM Tb_HSPR_FeesDetail WHERE ISNULL(IsDelete,0) = 0 AND ReceID = @ReceID UNION SELECT FeesID FROM Tb_HSPR_PreCostsDetail WHERE ISNULL(IsDelete,0) = 0 AND ReceID = @ReceID)", new { CommID, ReceID }).ToList(); if (null == CostList || CostList.Count <= 0) { return(new ApiResult(false, "订单数据错误").toJson()); } foreach (var CostGroup in CostList.GroupBy(item => Convert.ToString(item.CostName))) { if (null == CostGroup || CostGroup.Count() == 0) { continue; } #region 分组后,取费用最早的开始时间,和最晚的结束时间 DateTime FeesStateDate, FeesEndDate; FeesStateDate = DateTime.MaxValue; FeesEndDate = DateTime.MinValue; string CostID = ""; string CostName = ""; List <string> FeesIDList = new List <string>(); foreach (var item in CostGroup) { FeesIDList.Add(Convert.ToString(item.FeesID)); if (string.IsNullOrEmpty(CostID)) { CostID = Convert.ToString(item.CostID); } if (string.IsNullOrEmpty(CostName)) { CostName = Convert.ToString(item.CostName); } if (DateTime.TryParse(Convert.ToString(item.FeesStateDate), out DateTime startTime)) { if (FeesStateDate.CompareTo(startTime) > 0) { FeesStateDate = startTime; } } else { FeesStateDate = DateTime.Now; } if (DateTime.TryParse(Convert.ToString(item.FeesEndDate), out DateTime endTime)) { if (FeesEndDate.CompareTo(endTime) < 0) { FeesEndDate = endTime; } } else { FeesEndDate = DateTime.Now; } } #endregion decimal Amount = conn.QueryFirstOrDefault <decimal>(@"SELECT ISNULL(SUM(ISNULL(Amount,0.00)),0.00) AS Amount FROM ( SELECT ISNULL(SUM(ISNULL(ISNULL(ChargeAmount,0.00) + ISNULL(LateFeeAmount,0.00),0.00)),0.00) AS Amount FROM Tb_HSPR_FeesDetail WHERE ISNULL(IsDelete,0) = 0 AND ReceID = @ReceID AND FeesID IN @FeesID UNION SELECT ISNULL(SUM(ISNULL(DueAmount,0.00)),0.00) AS Amount FROM Tb_HSPR_PreCostsDetail WHERE ISNULL(IsDelete,0) = 0 AND ReceID = @ReceID AND FeesID IN @FeesID ) AS a", new { ReceID, FeesID = FeesIDList.ToArray() }); FeesInfoList.Add(new Dictionary <string, string> { { "CostID", CostID }, { "CostName", CostName }, { "Amount", Amount.ToString() }, { "CostArea", FeesStateDate.ToString("yyyy-MM") + "至" + FeesEndDate.ToString("yyyy-MM") } }); } } if (BillType == 2) { dynamic info = conn.QueryFirstOrDefault("SELECT CostID,CostNames,PrecMemo FROM Tb_HSPR_PreCostsDetail WHERE ISNULL(IsDelete,0) = 0 AND ReceID = @ReceID", new { ReceID }).ToList(); if (null != info) { string CostID = Convert.ToString(info.CostID); string CostName = Convert.ToString(info.CostNames); string PrecMemo = Convert.ToString(info.PrecMemo); string PrecAmount = Convert.ToString(info.PrecAmount); FeesInfoList.Add(new Dictionary <string, string> { { "CostID", CostID }, { "CostName", CostName }, { "Amount", PrecAmount }, { "CostArea", PrecMemo } }); } } string ElectronicInvoice = string.Empty; if (conn.QueryFirstOrDefault <long>("SELECT isnull(object_id(N'Tb_HSPR_ElectronicInvoice',N'U'),0)") != 0) { ElectronicInvoice = conn.QueryFirstOrDefault <string>("SELECT ImgUrl FROM Tb_HSPR_ElectronicInvoice WHERE CommID = @CommID AND ReceID = @ReceID", new { CommID, ReceID }); } result.Add("Amount", BillsAmount); result.Add("Status", "交易成功"); result.Add("PayType", ChargeMode); result.Add("CreateTime", BillsDate); result.Add("OrderSN", ReceID); result.Add("FeesDetail", FeesInfoList); result.Add("ElectronicInvoice", ElectronicInvoice); return(new ApiResult(true, result).toJson()); } }
public void CostShowEvent() { CostGroup.SetActive(true); }