void Awake() { title = Title.GetComponent <titleCard>(); TimerRect = Timer.GetComponent <RectTransform>(); headerWonbo = HeaderWonbo.GetComponent <RectTransform>(); headerJiyeon = HeaderJiYeon.GetComponent <RectTransform>(); joystickBase = JoystickBase.GetComponent <RectTransform>(); joystick = Joystick.GetComponent <RectTransform>(); endCard = EndCard.GetComponent <EndCard>(); introCard = IntroCard.GetComponent <IntroCard>(); finalCard = FinalCard.GetComponent <FinalCard>(); waitCard = WaitCard.GetComponent <LIWaitCard>(); }
protected void DataGrid1_RowCommand(object sender, GridViewCommandEventArgs e) { GridViewRow Row = (GridViewRow)((LinkButton)e.CommandSource).NamingContainer; if (e.CommandName.ToString().Trim() == "Sort") { return; } int RangeID; try { RangeID = Convert.ToInt32(Row.Cells[0].Text); } catch { RangeID = 0; } int BeginCard; try { BeginCard = Convert.ToInt32(Row.Cells[4].Text); } catch { BeginCard = 0; } int EndCard; try { EndCard = Convert.ToInt32(Row.Cells[5].Text); } catch { EndCard = 0; } string ToStoreID = ((TextBox)Row.FindControl("txt_ToStore")).Text.Trim(); int count1 = VIPCardManageBll.BetweenCard(Convert.ToInt32(BeginCard.ToString()), Convert.ToInt32(EndCard.ToString())); switch (e.CommandName.Trim()) { case "DELETE": if (count1 > 0) { ScriptHelper.SetAlert(Page, GetTran("001578", "该卡号段中的一些卡号已分配到会员,不能取消分配")); return; } VIPCardManageBll.Uptvipcard(Convert.ToInt32(RangeID.ToString().Trim())); ScriptHelper.SetAlert(Page, GetTran("001577", "卡号范围“") + RangeID.ToString() + GetTran("001576", "”取消分配成功!")); break; case "UPDATE": if (count1 > 0) { ScriptHelper.SetAlert(Page, GetTran("001573", "该卡号段中的一些卡号已分配到会员,不能重新分配")); return; } int count2 = VIPCardManageBll.valiStore(ToStoreID); if (count2 == 0) { ScriptHelper.SetAlert(Page, GetTran("001571", "店铺“") + ToStoreID + GetTran("001569", "”不存在,不能将卡号范围重分配到该店铺")); return; } VIPCardManageBll.Uptvipcardstore(Convert.ToInt32(ToStoreID), RangeID.ToString().Trim()); ScriptHelper.SetAlert(Page, GetTran("001568", "卡号范围“") + RangeID.ToString() + GetTran("001565", "”重分配到店铺“") + ToStoreID + GetTran("001563", "”成功!")); break; } btn_Query_Click1(null, null); }