예제 #1
0
        protected void dataload()
        {
            int qishu = 0;

            qishu = Convert.ToInt16(Request.QueryString["qishu"]);
            if (qishu != 0)
            {
                Maticsoft.BLL.peixunban1 pxb = new BLL.peixunban1();
                Literal biaoti = (Literal)Page.Master.FindControl("Literal1");
                biaoti.Text = pxb.GetList("id=" + qishu).Tables[0].Rows[0]["name"].ToString() + "总结视频";
                StringBuilder        str = new StringBuilder();
                Maticsoft.BLL.photos ph  = new BLL.photos();
                DataTable            dt  = ph.GetList("qishu =" + qishu + " and fileExtension = '.mp4'").Tables[0];
                if (dt.Rows.Count == 0)
                {
                    Literal1.Text = "暂无视频";
                }
                else
                {
                    string video_url = "../images/" + dt.Rows[0]["FileName"].ToString();
                    string _type     = dt.Rows[0]["ContentType"].ToString();
                    str.Append(" <video id='example_video_1' class='video-js vjs-default-skin' controls preload='none' width='800' height='550'   poster='http://video-js.zencoder.com/oceans-clip.png'   data-setup='{}'>");
                    str.Append(" <source src='" + video_url + "' type='" + _type + "' />");
                    str.Append("<track kind='captions' src='demo.captions.vtt' srclang='en' label='English'></track><!-- Tracks need an ending tag thanks to IE9 -->");
                    str.Append(" <track kind='subtitles' src='demo.captions.vtt' srclang='en' label='English'></track><!-- Tracks need an ending tag thanks to IE9 -->");
                    Literal1.Text = str.ToString();
                }
            }
            else
            {
                Response.Redirect("showlist.aspx");
            }
        }
예제 #2
0
        protected void dataload()
        {
            qishu = Convert.ToInt16(Request.QueryString["qishu"]);
            if (qishu != 0)
            {
                Maticsoft.BLL.peixunban1 pxb = new BLL.peixunban1();
                pxb_name    = pxb.GetList("id=" + qishu).Tables[0].Rows[0]["name"].ToString();
                biaoti.Text = pxb_name;
            }
            else
            {
                Response.Redirect("showlist.aspx");
            }

            Maticsoft.BLL.photos ph   = new BLL.photos();
            DataTable            dtph = ph.get_fenlei(qishu.ToString()).Tables[0];

            if (dtph.Rows.Count > 0)
            {
                TableRow row = new TableRow();
                for (int i = 0; i < dtph.Rows.Count; i++)
                {
                    TableCell cell = new TableCell();
                    Button    bt   = new Button();
                    bt.Text   = dtph.Rows[i][0].ToString();
                    bt.Click += new EventHandler(bt_Click);
                    cell.Controls.Add(bt);
                    row.Cells.Add(cell);
                }
                Table1.Rows.Add(row);
            }
        }
예제 #3
0
 protected void databind()
 {
     Maticsoft.BLL.peixunban1 pei = new BLL.peixunban1();
     qishu_dro.DataSource     = pei.GetList("");
     qishu_dro.DataTextField  = "name";
     qishu_dro.DataValueField = "id";
     qishu_dro.DataBind();
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            Literal biaoti = (Literal)Page.Master.FindControl("Literal1");

            biaoti.Text = "请选择视频";
            if (!Page.IsPostBack)
            {
                Maticsoft.BLL.peixunban1 pxb = new BLL.peixunban1();
                DropDownList1.DataSource     = pxb.GetList("").Tables[0];
                DropDownList1.DataTextField  = "name";
                DropDownList1.DataValueField = "id";
                DropDownList1.DataBind();
            }
        }
예제 #5
0
 private void ShowInfo(int id)
 {
     Maticsoft.BLL.account   bll   = new Maticsoft.BLL.account();
     Maticsoft.Model.account model = bll.GetModel(id);
     this.lblid.Text      = model.id.ToString();
     this.lblname.Text    = model.name;
     this.lblleibei.Text  = model.leibei;
     this.lbllururen.Text = model.lururen;
     this.lbltime.Text    = model.time.ToString();
     if (model.peixunban_id != 0)
     {
         Maticsoft.BLL.peixunban1   pei_bll = new BLL.peixunban1();
         Maticsoft.Model.peixunban1 pei_mol = new Model.peixunban1();
         pei_mol = pei_bll.GetModel(Convert.ToInt16(model.peixunban_id));
         this.lblpeixunban_id.Text = pei_mol.name;
     }
     this.lblbeizhu.Text = model.beizhu;
 }
예제 #6
0
        public string loadeven()
        {
            string str = "";

            Maticsoft.BLL.peixunban1 pxb = new BLL.peixunban1();
            DataTable dt = pxb.GetList("").Tables[0];

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                str += "{ title:'";
                str += dt.Rows[i]["name"].ToString() + "(" + dt.Rows[i]["contact"].ToString() + ")";
                str += "',";
                str += "start: new Date(" + date_geshi(Convert.ToDateTime(dt.Rows[i]["start_time"].ToString()), 1) + "),";
                str += "end: new Date(" + date_geshi(Convert.ToDateTime(dt.Rows[i]["end_time"].ToString()), 1) + ")},";
            }

            return(str);
        }
        protected void submit_Click(object sender, EventArgs e)
        {
            string strErr = "";

            if (!PageValidate.IsDateTime(start_time.Text))
            {
                strErr += "开始时间格式错误!\\n";
            }
            if (!PageValidate.IsDateTime(end_time.Text))
            {
                strErr += "结束时间格式错误!\\n";
            }
            if (this.peixunban_name.Text.Trim().Length == 0)
            {
                strErr += "培训班名称不能为空!\\n";
            }
            if (this.contact_per.Text.Trim().Length == 0)
            {
                strErr += "联系人不能为空!\\n";
            }
            if (strErr != "")
            {
                MessageBox.Show(this, strErr);
                return;
            }

            Maticsoft.Model.peixunban1 pxb = new Model.peixunban1();
            pxb.name       = peixunban_name.Text.Trim();
            pxb.contact    = contact_per.Text.Trim();
            pxb.phone      = phone.Text.Trim();
            pxb.start_time = DateTime.Parse(start_time.Text);
            pxb.end_time   = DateTime.Parse(end_time.Text);
            pxb.sinal      = 2;
            pxb.beizhu     = num.Text;

            Maticsoft.BLL.peixunban1 pxb_bll = new BLL.peixunban1();
            int id = pxb_bll.Add(pxb);

            pxb.id = id;
            Session["peixunban"] = pxb;
            Maticsoft.Common.MessageBox.ShowAndRedirect(this, "保存成功!", "branch_add2.aspx");
        }
        protected void submit_Click(object sender, EventArgs e)
        {
            string strErr = "";

            if (this.start_detail.Text.Trim().Length == 0)
            {
                strErr += "入住时间明细不能为空!\\n";
            }
            if (this.end_detail.Text.Trim().Length == 0)
            {
                strErr += "退房时间明细不能为空!\\n";
            }


            if (!PageValidate.IsDecimal(cleaning_fee.Text))
            {
                strErr += "清洁费必须为数字!\\n";
            }
            if (this.fapiao_taitou.Text.Trim().Length == 0)
            {
                strErr += "发票抬头不能为空!\\n";
            }

            if (this.fantang.Text.Trim().Length == 0)
            {
                strErr += "fantang不能为空!\\n";
            }
            //if (!PageValidate.IsNumber(txtyuedu_shuoming.Text))
            //{
            //    strErr += "yuedu_shuoming格式错误!\\n";
            //}

            if (strErr != "")
            {
                MessageBox.Show(this, strErr);
                return;
            }
            AccountsPrincipal user = new AccountsPrincipal(Context.User.Identity.Name);
            User currentUser       = new LTP.Accounts.Bus.User(user);

            bcp.peixunban_id    = peixunbanid;
            bcp.num             = num;
            bcp.start_detail    = start_detail.Text.Trim();
            bcp.end_detail      = end_detail.Text.Trim();
            bcp.num_detail      = num_detail.Text.Trim();
            bcp.cleaning_fee    = Convert.ToDecimal(cleaning_fee.Text.Trim());
            bcp.fapiao_taitou   = fapiao_taitou.Text.Trim();
            bcp.basketball_time = basketball_time.Text.Trim();
            bcp.fantang         = fantang.Text.Trim();
            bcp.fangka_print    = Convert.ToInt16(fangka_print.SelectedValue);
            bcp.xishu_yongpin   = Convert.ToInt16(xishu.SelectedValue);
            bcp.fengongsi       = currentUser.TrueName;
            bcp.date            = DateTime.Today;


            Maticsoft.BLL.branch_company bcp_bll = new Maticsoft.BLL.branch_company();
            bcp_bll.Add(bcp);
            Maticsoft.BLL.peixunban1 pxb_bll = new BLL.peixunban1();
            pxb.id     = peixunbanid;
            pxb.beizhu = beizhu.Text.Trim();
            pxb_bll.Update_beizhu(pxb);
            Maticsoft.Common.MessageBox.ShowAndRedirect(this, "保存成功!", "list.aspx");
        }