コード例 #1
0
        private void ShowInfo(int id)
        {
            Maticsoft.BLL.account        bll   = new Maticsoft.BLL.account();
            Maticsoft.Model.account      model = bll.GetModel(id);
            Maticsoft.BLL.account_detail ac_d  = new BLL.account_detail();
            dt_all = ac_d.GetList(500, "", " id desc").Tables[0];
            //leibie.SelectedIndex = 1;
            leibie.SelectedValue = model.leibei.ToString().Trim();
            this.lblid.Text      = model.id.ToString();
            this.txtname.Text    = model.name;
            lururen.Text         = model.lururen;
            lurushijian.Text     = model.time.ToString();
            this.txtbeizhu.Text  = model.beizhu;
            this.txtbeizhu2.Text = model.beizhu2;

            Maticsoft.BLL.peixunban1 pei_bll = new Maticsoft.BLL.peixunban1();
            DataSet ds = new DataSet();

            ds = pei_bll.GetList("");
            qishu.DataSource     = ds;
            qishu.DataTextField  = "name";
            qishu.DataValueField = "id";
            qishu.DataBind();
            //qishu.SelectedValue = model.peixunban_id.ToString();
            if (model.peixunban_id != 0)
            {
                qishu.Items.FindByValue(model.peixunban_id.ToString()).Selected = true;
            }
            else
            {
                qishu.Enabled = false;
            }
        }
コード例 #2
0
        private void loaddata()
        {
            Maticsoft.BLL.wuzi wuzi_bll = new BLL.wuzi();
            DataTable          dt       = wuzi_bll.GetList("style = 1").Tables[0];

            GridView1.DataSource = dt;
            GridView1.DataBind();
            AccountsPrincipal user = new AccountsPrincipal(Context.User.Identity.Name);
            User currentUser       = new LTP.Accounts.Bus.User(user);

            fengongsi.Text = currentUser.TrueName;
            Maticsoft.BLL.peixunban1 bll = new Maticsoft.BLL.peixunban1();
            DataSet       ds             = new DataSet();
            StringBuilder strWhere       = new StringBuilder();

            strWhere.Append("[start_time] < '");
            strWhere.Append(DateTime.Today.AddDays(30).Date.ToShortDateString());
            strWhere.Append("' and [end_time] > '");
            strWhere.Append(DateTime.Today.AddDays(-30).Date.ToShortDateString());
            strWhere.Append("'");
            ds = bll.GetList(strWhere.ToString());
            qishu.DataSource     = ds;
            qishu.DataTextField  = "name";
            qishu.DataValueField = "id";
            qishu.DataBind();
            shijian.Text = DateTime.Now.ToShortDateString();
        }
コード例 #3
0
        public void loaddata()
        {
            //Session["open_id"] = "ozBiSt0zxI4W3ROkC4Xf0IxAC_Qg";
            if (Session["userinfo"] == null)
            {
                Response.Write("<script>alert('获取不到微信信息!');window.location='index.aspx'</script>");
            }
            else
            {
                wx_u_mod = (Maticsoft.Model.weixin_userinfo)Session["userinfo"];
            }

            Maticsoft.BLL.peixunban1 bll = new Maticsoft.BLL.peixunban1();
            DataSet       ds             = new DataSet();
            StringBuilder strWhere       = new StringBuilder();

            strWhere.Append("[start_time] < '");
            strWhere.Append(DateTime.Today.AddDays(30).Date.ToShortDateString());
            strWhere.Append("' and [end_time] > '");
            strWhere.Append(DateTime.Today.AddDays(-30).Date.ToShortDateString());
            strWhere.Append("'");
            ds = bll.GetList(strWhere.ToString());
            qishu.DataSource     = ds;
            qishu.DataTextField  = "name";
            qishu.DataValueField = "id";
            qishu.DataBind();
        }
コード例 #4
0
        public void BindData()
        {
            peixunban_id = Request.QueryString["peixunban_id"];

            Maticsoft.BLL.peixunban1 bll = new Maticsoft.BLL.peixunban1();
            DataSet       ds             = new DataSet();
            StringBuilder strWhere       = new StringBuilder();

            strWhere.Append("id=" + peixunban_id);
            ds          = bll.GetList(strWhere.ToString());
            Label1.Text = ds.Tables[0].Rows[0]["name"].ToString();
            //DropDownList1.DataSource = ds;
            //DropDownList1.DataTextField = "name";
            //DropDownList1.DataValueField = "id";
            //DropDownList1.DataBind();
            //DropDownList1.SelectedValue = peixunban_id.ToString();

            Maticsoft.BLL.kecheng_neirong bll2 = new BLL.kecheng_neirong();
            DataSet ds2 = new DataSet();

            ds2 = bll2.GetList("");
            DropDownList2.DataSource     = ds2;
            DropDownList2.DataTextField  = "name";
            DropDownList2.DataValueField = "id";
            DropDownList2.DataBind();

            Maticsoft.BLL.teacher bll3 = new BLL.teacher();
            DataSet ds3 = new DataSet();

            ds3 = bll3.GetList("");
            DropDownList3.DataSource     = ds3;
            DropDownList3.DataTextField  = "name";
            DropDownList3.DataValueField = "id";
            DropDownList3.DataBind();
        }
コード例 #5
0
        private void loaddata()
        {
            name.Text = DateTime.Now.ToShortDateString() + "填的单据";
            return_str();
            Maticsoft.BLL.account_detail ac_d = new BLL.account_detail();
            dt_all = ac_d.GetList(500, "", " id desc").Tables[0];
            DataTable dt = new DataTable();

            dt.Columns.Add("id", typeof(int));
            for (int i = 1; i < 6; i++)
            {
                DataRow row = dt.NewRow(); row["id"] = i; dt.Rows.Add(row);
            }
            GridView1.DataSource = dt;
            GridView1.DataBind();

            AccountsPrincipal user = new AccountsPrincipal(Context.User.Identity.Name);
            User currentUser       = new LTP.Accounts.Bus.User(user);

            //lururen.Text = currentUser.TrueName;


            Maticsoft.BLL.peixunban1 bll = new Maticsoft.BLL.peixunban1();
            DataSet       ds             = new DataSet();
            StringBuilder strWhere       = new StringBuilder();

            strWhere.Append("[start_time] < '");
            strWhere.Append(DateTime.Today.AddDays(30).Date.ToShortDateString());
            strWhere.Append("' and [end_time] > '");
            strWhere.Append(DateTime.Today.AddDays(-30).Date.ToShortDateString());
            strWhere.Append("'");
            ds = bll.GetList(strWhere.ToString());
            qishu.DataSource     = ds;
            qishu.DataTextField  = "name";
            qishu.DataValueField = "id";
            qishu.DataBind();

            Maticsoft.BLL.account account_bll = new BLL.account();
            DataSet ds2 = account_bll.lururen("");

            jingshouren.DataSource     = ds2;
            jingshouren.DataTextField  = "lururen";
            jingshouren.DataValueField = "lururen";
            jingshouren.DataBind();
            for (int i = 0; i < jingshouren.Items.Count; i++)
            {
                if (jingshouren.Items[i].Value.Trim() == currentUser.TrueName)
                {
                    jingshouren.Items[i].Selected = true;
                }
            }
            //jingshouren.SelectedValue = currentUser.TrueName;
            luru_time.Text = DateTime.Now.ToShortDateString();
        }
コード例 #6
0
        public void BindData()
        {
            Maticsoft.BLL.peixunban1 bll = new Maticsoft.BLL.peixunban1();
            DataSet       ds             = new DataSet();
            StringBuilder strWhere       = new StringBuilder();

            ds = bll.GetList(strWhere.ToString());
            DropDownList1.DataSource     = ds;
            DropDownList1.DataTextField  = "name";
            DropDownList1.DataValueField = "id";
            DropDownList1.DataBind();
        }
コード例 #7
0
 private void ShowInfo(int id)
 {
     Maticsoft.BLL.peixunban1   bll   = new Maticsoft.BLL.peixunban1();
     Maticsoft.Model.peixunban1 model = bll.GetModel(id);
     id_load = model.id.ToString();
     this.txtstart_time.Text = model.start_time.ToString();
     this.txtend_time.Text   = model.end_time.ToString();
     this.txtname.Text       = model.name;
     this.txtcontact.Text    = model.contact;
     this.txtbeizhu.Text     = model.beizhu;
     this.txtphone.Text      = model.phone;
 }
コード例 #8
0
        private void bindqishu()
        {
            Maticsoft.BLL.peixunban1 bll      = new Maticsoft.BLL.peixunban1();
            StringBuilder            strWhere = new StringBuilder();

            strWhere.Append("[start_time] < '");
            strWhere.Append(DateTime.Today.AddDays(30).Date.ToShortDateString());
            strWhere.Append("' and [end_time] > '");
            strWhere.Append(DateTime.Today.AddDays(-30).Date.ToShortDateString());
            strWhere.Append("'");
            DataSet ds = bll.GetList(strWhere.ToString());

            qishu.DataSource     = ds;
            qishu.DataTextField  = "name";
            qishu.DataValueField = "id";
            qishu.DataBind();
        }
コード例 #9
0
        public void BindData()
        {
            Maticsoft.BLL.peixunban1 bll = new Maticsoft.BLL.peixunban1();
            DataSet       ds             = new DataSet();
            StringBuilder strWhere       = new StringBuilder();

            strWhere.Append("[start_time] < '");
            strWhere.Append(DateTime.Today.AddDays(10).Date.ToShortDateString());
            strWhere.Append("' and [end_time] > '");
            strWhere.Append(DateTime.Today.AddDays(-10).Date.ToShortDateString());
            strWhere.Append("'");
            ds = bll.GetList(strWhere.ToString());
            qishu.DataSource     = ds;
            qishu.DataTextField  = "name";
            qishu.DataValueField = "id";
            qishu.DataBind();
            int qishu_nit = Convert.ToInt16(qishu.SelectedValue);

            BindView(qishu_nit);
        }
コード例 #10
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            string strErr = "";

            if (!PageValidate.IsDateTime(txtstart_time.Text))
            {
                strErr += "start_time格式错误!\\n";
            }
            if (!PageValidate.IsDateTime(txtend_time.Text))
            {
                strErr += "end_time格式错误!\\n";
            }
            if (this.txtname.Text.Trim().Length == 0)
            {
                strErr += "name不能为空!\\n";
            }

            if (strErr != "")
            {
                MessageBox.Show(this, strErr);
                return;
            }
            DateTime start_time = DateTime.Parse(this.txtstart_time.Text);
            DateTime end_time   = DateTime.Parse(this.txtend_time.Text);
            string   name       = this.txtname.Text;

            Maticsoft.Model.peixunban1 model = new Maticsoft.Model.peixunban1();
            model.start_time = start_time;
            model.end_time   = end_time;
            model.name       = name;
            model.beizhu     = beizhu.Text;
            model.contact    = contact.Text;
            model.phone      = phone.Text;
            model.sinal      = Convert.ToInt16(sinal.SelectedValue);
            Maticsoft.BLL.peixunban1 bll = new Maticsoft.BLL.peixunban1();
            bll.Add(model);
            Maticsoft.Common.MessageBox.ShowAndRedirect(this, "保存成功!", "add.aspx");
        }
コード例 #11
0
        /// <summary>
        /// 获取培训班信息、课程内容信息,绑定两个下拉框
        /// </summary>
        public void BindData()
        {
            Maticsoft.BLL.peixunban1 bll = new Maticsoft.BLL.peixunban1();
            DataSet       ds             = new DataSet();
            StringBuilder strWhere       = new StringBuilder();

            strWhere.Append("[start_time] < '");
            strWhere.Append(DateTime.Today.AddDays(30).Date.ToShortDateString());
            strWhere.Append("' and [end_time] > '");
            strWhere.Append(DateTime.Today.AddDays(-30).Date.ToShortDateString());
            strWhere.Append("'");
            ds = bll.GetList(strWhere.ToString());
            qishu.DataSource     = ds;
            qishu.DataTextField  = "name";
            qishu.DataValueField = "id";
            qishu.DataBind();

            Maticsoft.BLL.kecheng_neirong bll2 = new BLL.kecheng_neirong();
            DataSet ds2 = new DataSet();

            ds2 = bll2.GetList("");
            kecheng.DataSource     = ds2;
            kecheng.DataTextField  = "name";
            kecheng.DataValueField = "id";
            kecheng.DataBind();


            fen_zu(Convert.ToInt16(qishu.SelectedValue));
            ke_cheng(Convert.ToInt16(qishu.SelectedValue));


            if (Session["shangke_vie"] != null)
            {
                Session["shangke_vie"] = null;
            }
        }
コード例 #12
0
        private void loaddata()
        {
            Maticsoft.BLL.account_view acc_bll = new BLL.account_view();
            GridView1.DataSource = acc_bll.GetList(100, "", "detail_id");
            GridView1.DataBind();

            Maticsoft.BLL.peixunban1 bll = new Maticsoft.BLL.peixunban1();
            DataSet       ds             = new DataSet();
            StringBuilder strWhere       = new StringBuilder();

            strWhere.Append("[start_time] < '");
            strWhere.Append(DateTime.Today.AddDays(30).Date.ToShortDateString());
            strWhere.Append("' and [end_time] > '");
            strWhere.Append(DateTime.Today.AddDays(-30).Date.ToShortDateString());
            strWhere.Append("'");
            ds = bll.GetList(strWhere.ToString());
            DataRow newrow = ds.Tables[0].NewRow();

            newrow["id"]   = "999";
            newrow["name"] = "—全部显示—";
            ds.Tables[0].Rows.Add(newrow);
            qishu.DataSource     = ds;
            qishu.DataTextField  = "name";
            qishu.DataValueField = "id";
            qishu.DataBind();
            Maticsoft.BLL.account account_bll = new BLL.account();
            DataSet ds2     = account_bll.lururen("");
            DataRow newrow2 = ds2.Tables[0].NewRow();

            newrow2["lururen"] = "—全部显示—";
            ds2.Tables[0].Rows.Add(newrow2);
            lururen.DataSource     = ds2;
            lururen.DataTextField  = "lururen";
            lururen.DataValueField = "lururen";
            lururen.DataBind();
        }
コード例 #13
0
        private void ShowInfo(int id)
        {
            Maticsoft.BLL.peixunban1   bll   = new Maticsoft.BLL.peixunban1();
            Maticsoft.Model.peixunban1 model = bll.GetModel(id);

            this.lblstart_time.Text = Convert.ToDateTime(model.start_time.ToString()).ToShortDateString();
            this.lblend_time.Text   = Convert.ToDateTime(model.end_time.ToString()).ToShortDateString();
            this.lblname.Text       = model.name;
            contact.Text            = model.contact;
            phone.Text  = model.phone;
            beizhu.Text = model.beizhu;
            Maticsoft.BLL.branch_company   bhc_bll = new BLL.branch_company();
            Maticsoft.Model.branch_company bhc_mod = bhc_bll.GetModel_bypeixunban(id);
            start_detail.Text    = bhc_mod.start_detail.ToString();
            end_detail.Text      = bhc_mod.end_detail.ToString();
            num.Text             = bhc_mod.num.ToString() + "人";
            num_detail.Text      = bhc_mod.num_detail.ToString();
            cleaning_fee.Text    = bhc_mod.cleaning_fee.ToString() + "元";
            fapiao_taitou.Text   = bhc_mod.fapiao_taitou.ToString();
            basketball_time.Text = bhc_mod.basketball_time.ToString();
            fantang.Text         = bhc_mod.fantang.ToString();
            fangka_print.Text    = (bhc_mod.fangka_print == 1 ? "不打印名字" : "打印名字");
            xishu_yongpin.Text   = (bhc_mod.xishu_yongpin == 1 ? "简易洗漱用品" : "旅行套装");
        }
コード例 #14
0
        public void btnSave_Click(object sender, EventArgs e)
        {
            string strErr = "";

            if (!PageValidate.IsDateTime(txtstart_time.Text))
            {
                strErr += "开始时间格式错误!\\n";
            }
            if (!PageValidate.IsDateTime(txtend_time.Text))
            {
                strErr += "结束时间格式错误!\\n";
            }
            if (this.txtname.Text.Trim().Length == 0)
            {
                strErr += "培训班名称不能为空!\\n";
            }
            if (this.txtcontact.Text.Trim().Length == 0)
            {
                strErr += "联系人不能为空!\\n";
            }


            if (this.txtphone.Text.Trim().Length == 0)
            {
                strErr += "联系电话不能为空!\\n";
            }
            if (strErr != "")
            {
                MessageBox.Show(this, strErr);
                return;
            }
            int      id         = int.Parse(id_load);
            DateTime start_time = DateTime.Parse(this.txtstart_time.Text);
            DateTime end_time   = DateTime.Parse(this.txtend_time.Text);
            string   name       = this.txtname.Text;
            string   contact    = this.txtcontact.Text;
            int      sinal      = 2;
            string   beizhu     = this.txtbeizhu.Text;
            string   phone      = this.txtphone.Text;

            Maticsoft.Model.peixunban1 model = new Maticsoft.Model.peixunban1();
            model.id         = id;
            model.start_time = start_time;
            model.end_time   = end_time;
            model.name       = name;
            model.contact    = contact;
            model.sinal      = sinal;
            model.beizhu     = beizhu;
            model.phone      = phone;


            Maticsoft.BLL.peixunban1 bll = new Maticsoft.BLL.peixunban1();
            bll.Update(model);

            #region 开始branch_company表的数据更新
            Maticsoft.BLL.branch_company   bnc_bll = new BLL.branch_company();
            Maticsoft.Model.branch_company bnc_mod = bnc_bll.GetModel_bypeixunban(id);


            if (this.txtstart_detail.Text.Trim().Length == 0)
            {
                strErr += "入住具体时间不能为空!\\n";
            }
            if (this.txtend_detail.Text.Trim().Length == 0)
            {
                strErr += "退房具体时间不能为空!\\n";
            }
            if (!PageValidate.IsNumber(txtnum.Text))
            {
                strErr += "人数格式错误!\\n";
            }

            if (!PageValidate.IsDecimal(txtcleaning_fee.Text))
            {
                strErr += "清洁费用格式错误!\\n";
            }
            if (this.txtfapiao_taitou.Text.Trim().Length == 0)
            {
                strErr += "发票抬头不能为空!\\n";
            }

            if (this.txtfantang.Text.Trim().Length == 0)
            {
                strErr += "饭堂订餐不能为空!\\n";
            }
            //if (!PageValidate.IsNumber(txtfangka_print.Text))
            //{
            //    strErr += "fangka_print格式错误!\\n";
            //}


            if (strErr != "")
            {
                MessageBox.Show(this, strErr);
                return;
            }


            string  start_detail    = this.txtstart_detail.Text;
            string  end_detail      = this.txtend_detail.Text;
            int     num             = int.Parse(this.txtnum.Text);
            string  num_detail      = this.txtnum_detail.Text;
            decimal cleaning_fee    = decimal.Parse(this.txtcleaning_fee.Text);
            string  fapiao_taitou   = this.txtfapiao_taitou.Text;
            string  basketball_time = this.txtbasketball_time.Text;
            string  fantang         = this.txtfantang.Text;
            //int fangka_print1 = int.Parse(this.txtfangka_print.Text);



            Maticsoft.Model.branch_company model_branch = new Maticsoft.Model.branch_company();
            model_branch.id              = bnc_mod.id;
            model_branch.peixunban_id    = id;
            model_branch.start_detail    = start_detail;
            model_branch.end_detail      = end_detail;
            model_branch.num             = num;
            model_branch.num_detail      = num_detail;
            model_branch.cleaning_fee    = cleaning_fee;
            model_branch.fapiao_taitou   = fapiao_taitou;
            model_branch.basketball_time = basketball_time;
            model_branch.fantang         = fantang;
            model_branch.fangka_print    = Convert.ToInt16(fangka_print.SelectedValue);
            model_branch.fengongsi       = bnc_mod.fengongsi;
            model_branch.date            = DateTime.Today;
            model_branch.xishu_yongpin   = Convert.ToInt16(xishu.SelectedValue);
            Maticsoft.BLL.branch_company bll_branch = new Maticsoft.BLL.branch_company();
            bll_branch.Update(model_branch);
            #endregion
            Maticsoft.Common.MessageBox.ShowAndRedirect(this, "保存成功!", "list.aspx");
        }