Exemplo n.º 1
0
        protected void lbAddItem_Click(object sender, EventArgs e)
        {
            lbMessage.Text = "";
            if (!string.IsNullOrEmpty(lbFormId.Text))
            {
                try
                {
                    BLL.Application.BX.MyBXForm myform = new BLL.Application.BX.MyBXForm();
                    t_BX_FormItem items = new t_BX_FormItem();
                    items.Date = Convert.ToDateTime(tbItemsStart.Text);
                    items.Days = Convert.ToInt32( tbDays.Text);
                    items.PeoplesNum = Convert.ToInt32(tbItemsPeopleNum.Text);
                    items.TrafficFee = string.IsNullOrEmpty(tbShineiFee.Text) ? 0 : Convert.ToDecimal(tbShineiFee.Text);
                    items.CityTrafficFee = string.IsNullOrEmpty(tbChengjianFee.Text) ? 0 : Convert.ToDecimal(tbChengjianFee.Text);
                    items.AccommodationFee = string.IsNullOrEmpty(tbAccomdanceFee.Text) ? 0 : Convert.ToDecimal(tbAccomdanceFee.Text);
                    items.IsReception = Convert.ToBoolean( Convert.ToInt32( ddlIsReception.SelectedValue));
                    items.FormId = Convert.ToInt32(lbFormId.Text);
                    if (myform.saveFormItem(Convert.ToInt32(lbFormId.Text), items))
                    {
                        //更新列表
                        RepeaterItem.DataSource = myform.getFormItems(Convert.ToInt32(lbFormId.Text));
                      RepeaterItem.DataBind();
                      clearinput();
                    }

                }
                catch (Exception ex)
                {
                    lbMessage.Text = "错误:" + ex.Message;
                }
            }
        }
Exemplo n.º 2
0
        protected void initPositionType(int selecet = 0)
        {
            List<t_BX_PositionType> lists = new BLL.Application.BX.MyBXForm().getDDLPositionType();
            ddlPositionType.Items.Clear();
            ListItem li = new ListItem();
            li.Text = "";
            li.Value = "";
            ddlPositionType.Items.Add(li);
            foreach (t_BX_PositionType l in lists)
            {
                ListItem ll = new ListItem();
                ll.Text = l.name;
                ll.Value = l.Id.ToString();
                if (l.Id == selecet)
                    ll.Selected = true;
                ddlPositionType.Items.Add(ll);

            }
        }
Exemplo n.º 3
0
 protected void initPositon(string select = "")
 {
     tbPosition.Enabled = false;
     tbPosition.Text = "";
     ddlPosition.Visible = true;
     ddlPosition.Items.Clear();
     List<t_BX_Position> lists = new BLL.Application.BX.MyBXForm().getDDLPosition(Convert.ToInt32(ddlPositionType.SelectedValue));
     ListItem li = new ListItem();
     li.Text = "";
     li.Value = "";
     ddlPosition.Items.Add(li);
     foreach (t_BX_Position p in lists)
     {
         ListItem l = new ListItem();
         l.Text = p.Name;
         l.Value = p.Id.ToString();
         if (p.Name.Trim() == select)
             l.Selected = true;
         ddlPosition.Items.Add(l);
     }
 }
Exemplo n.º 4
0
 protected void initDDlXian(int select = 0)
 {
     List<Region> lists = new BLL.Application.BX.MyBXForm().getDDLRegion(Convert.ToInt32(ddlShi.SelectedValue));
     ddlXian.Items.Clear();
     ListItem li = new ListItem();
     li.Text = "";
     li.Value = "";
     ddlXian.Items.Add(li);
     foreach (Region l in lists)
     {
         ListItem ll = new ListItem();
         ll.Text = l.REGION_NAME;
         ll.Value = l.REGION_ID.ToString();
         if (l.REGION_ID == select)
             ll.Selected = true;
         ddlXian.Items.Add(ll);
     }
 }