Exemple #1
0
    protected void GetStrategyGroupinfo()
    {
        Tb_Ticket_StrategyGroup group = baseDataManage.CallMethod("Tb_Ticket_StrategyGroup", "GetById", null, new object[] { ViewState["id"].ToString() }) as Tb_Ticket_StrategyGroup;

        this.txtGroupName.Text            = group.GroupName;
        this.txtUnitePoint.Text           = group.UnitePoint.ToString();
        this.rblDefaultFlag.SelectedValue = group.DefaultFlag.ToString();
        this.rblUniteFlag.SelectedValue   = group.UniteFlag.ToString();
        this.txtGroupName.Enabled         = false;
    }
Exemple #2
0
 /// <summary>
 /// 列表操作
 /// </summary>
 /// <param name="source"></param>
 /// <param name="e"></param>
 protected void repList_ItemCommand(object source, RepeaterCommandEventArgs e)
 {
     try
     {
         string id = e.CommandArgument.ToString();
         if (e.CommandName == "Del")
         {
             Tb_Ticket_StrategyGroup Mgroup = baseDataManage.CallMethod("Tb_Ticket_StrategyGroup", "GetById", null, new object[] { id }) as Tb_Ticket_StrategyGroup;
             string        sql1             = "delete from Tb_Ticket_StrategyGroup where id='" + id + "'";
             string        sql2             = "delete from Tb_Ticket_TakeOffDetail where GroupId ='" + id + "'";
             List <string> sqllist          = new List <string>();
             sqllist.Add(sql1);
             sqllist.Add(sql2);
             string errormsg = "";
             msg = baseDataManage.ExecuteSqlTran(sqllist, out errormsg) == true ? "删除成功" : "删除失败";
             if (msg == "删除成功")
             {
                 //日志
                 Log_Operation logoper = new Log_Operation();
                 logoper.ModuleName  = "扣点组管理";
                 logoper.LoginName   = mUser.LoginName;
                 logoper.UserName    = mUser.UserName;
                 logoper.CreateTime  = Convert.ToDateTime(DateTime.Now);
                 logoper.CpyNo       = mCompany.UninCode;
                 logoper.OperateType = "删除扣点组";
                 logoper.OptContent  = "删除扣点组id:" + id + ",组名:" + Mgroup.GroupName;
                 new PbProject.Logic.Log.Log_OperationBLL().InsertLog_Operation(logoper);//添加日志
                 BindDiscountList();
             }
         }
         else
         {
             Response.Redirect("DiscountSet.aspx?gid=" + id + "&currentuserid=" + this.currentuserid.Value.ToString());
         }
     }
     catch (Exception)
     {
         msg = "操作异常";
         throw;
     }
     ScriptManager.RegisterStartupScript(this, GetType(), "", "showdialog('" + msg + "');", true);
 }
 /// <summary>
 /// 获取要修改的组详情数据
 /// </summary>
 /// <param name="id"></param>
 public void GetDiscountDetailInfo(string gid, string gdid)
 {
     this.txtGroupName.Enabled = false;
     if (gid != "")
     {
         Tb_Ticket_StrategyGroup mgroup = (this.baseDataManage.CallMethod("Tb_Ticket_StrategyGroup", "GetList", null, new object[] { "id='" + gid + "'" }) as List <Tb_Ticket_StrategyGroup>)[0] as Tb_Ticket_StrategyGroup;
         this.txtGroupName.Text            = mgroup.GroupName.ToString();
         this.rblDefaultFlag.SelectedIndex = mgroup.DefaultFlag == true ? 1 : 0;
         this.rblDefaultFlag.SelectedValue = mgroup.DefaultFlag.ToString();
         this.rblUniteFlag.SelectedIndex   = mgroup.UniteFlag;
         this.rblUniteFlag.SelectedValue   = mgroup.UniteFlag.ToString();
         this.txtUnitePoint.Text           = mgroup.UnitePoint.ToString();
     }
     if (gdid != "")
     {
         Tb_Ticket_TakeOffDetail mgdetail = (this.baseDataManage.CallMethod("Tb_Ticket_TakeOffDetail", "GetList", null, new object[] { "id='" + gdid + "'" }) as List <Tb_Ticket_TakeOffDetail>)[0] as Tb_Ticket_TakeOffDetail;
         this.SelectAirCode1.Value        = mgdetail.CarryCode;
         this.ddlbasetype.SelectedValue   = mgdetail.BaseType.ToString();
         this.rblSelectType.SelectedValue = mgdetail.SelectType.ToString();
         List <string> listpolicys = new List <string>();
         string[]      jkitems     = mgdetail.PolicySource.Split(',');
         listpolicys.AddRange(jkitems);
         ListItemCollection listitems = cbljk.Items;
         for (int i = 0; i < listitems.Count; i++)
         {
             if (listpolicys.Contains(listitems[i].Value))
             {
                 listitems[i].Selected = true;
             }
         }
         this.txtStartDate.Value = mgdetail.TimeScope.Split('|')[0].ToString();
         this.txtEndDate.Value   = mgdetail.TimeScope.Split('|')[1].ToString();
         this.txtFromCode.Value  = mgdetail.FromCityCode.ToString().TrimStart('/');
         this.txtToCode.Value    = mgdetail.ToCityCode.ToString().TrimStart('/');
         this.FromCityCode.Value = mgdetail.FromCityCode.ToString().TrimStart('/');
         this.ToCityCode.Value   = mgdetail.ToCityCode.ToString().TrimStart('/');
         if (mgdetail.PointScope != "")
         {
             hidtxtCount.Value = mgdetail.PointScope.Split('|').Length.ToString();
             for (int i = 0; i < mgdetail.PointScope.Split('|').Length; i++)
             {
                 //不是最后一个
                 if (i < mgdetail.PointScope.Split('|').Length - 1)
                 {
                     if (i != 4)
                     {
                         ((System.Web.UI.HtmlControls.HtmlGenericControl) this.FindControl("sAdd" + i)).Style.Value = "display: none";
                     }
                     if (i != 0)
                     {
                         ((System.Web.UI.HtmlControls.HtmlGenericControl) this.FindControl("sDelete" + i)).Style.Value = "display: none";
                     }
                 }
                 //最后一个
                 else
                 {
                     if (i != 4)
                     {
                         ((System.Web.UI.HtmlControls.HtmlGenericControl) this.FindControl("sAdd" + i)).Style.Value = "display: block";
                     }
                     if (i != 0)
                     {
                         ((System.Web.UI.HtmlControls.HtmlGenericControl) this.FindControl("sDelete" + i)).Style.Value = "display: block";
                     }
                 }
                 ((System.Web.UI.HtmlControls.HtmlTableRow) this.FindControl("tr" + i)).Style.Value = "display: block";
                 txtA      = ((TextBox)this.FindControl("txtA" + i));
                 txtB      = ((TextBox)this.FindControl("txtB" + i));
                 txtP      = ((TextBox)this.FindControl("txtpoint" + i)); //扣点
                 txtM      = ((TextBox)this.FindControl("txtMoney" + i)); //现返
                 txtA.Text = mgdetail.PointScope.Split('|')[i].Split('^')[0].Split('-')[0].ToString();
                 txtB.Text = mgdetail.PointScope.Split('|')[i].Split('^')[0].Split('-')[1].ToString();
                 txtP.Text = mgdetail.PointScope.Split('|')[i].Split('^')[1].ToString();
                 txtM.Text = mgdetail.PointScope.Split('|')[i].Split('^')[2].ToString();
             }
         }
         this.showjk.Style.Value = mgdetail.BaseType == 2 ? "display: block" : "display: none";
     }
 }
 /// <summary>
 /// 添加扣点组
 /// </summary>
 /// <param name="ttsg"></param>
 /// <param name="tttod"></param>
 /// <returns></returns>
 public bool AddTb_Ticket_StrategyGroup(Tb_Ticket_StrategyGroup ttsg, Tb_Ticket_TakeOffDetail tttod)
 {
     return(false);
 }