/// <summary>
        /// 提交订单按钮
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void cbtnOrder_Click(object sender, EventArgs e)
        {
            //获取选中的征订计划ID列表
            cgrdPlanSet.PersistCheckState<SubscriptionForSubmitView>();

            IList<SubscriptionForSubmitView> views = cgrdPlanSet.GetAllCheckedDataList<SubscriptionForSubmitView>();

            if (views.Count > 0)
            {
                //获取书商ID
                string booksellerId = ccmbBookseller.SelectedValue;

                //生成订单
                using (SubscriptionApplClient app = new SubscriptionApplClient())
                {
                    var result = app.SubmitSubscriptions(booksellerId, ctxtSpareCount.Text.Trim(), views.ToArray());

                    USCTAMis.Web.WebClient.ScriptManager.Alert(result.Message);
                }

            }
            else
            {
                USCTAMis.Web.WebClient.ScriptManager.Alert("请选择订单");
            }
        }
        /// <summary>
        /// 提交订单按钮
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void cbtnOrder_Click(object sender, EventArgs e)
        {
            //获取选中的征订计划ID列表
            cgrdPlanSet.PersistCheckState <SubscriptionForSubmitView>();

            IList <SubscriptionForSubmitView> views = cgrdPlanSet.GetAllCheckedDataList <SubscriptionForSubmitView>();

            if (views.Count() > 0)
            {
                //获取书商ID
                string booksellerId = ccmbBookseller.SelectedValue;

                //生成订单
                using (SubscriptionApplClient app = new SubscriptionApplClient())
                {
                    var result = app.SubmitSubscriptions(booksellerId, ctxtSpareCount.Text.Trim(), views.ToArray());

                    USCTAMis.Web.WebClient.ScriptManager.Alert(result.Message);
                }
            }
            else
            {
                USCTAMis.Web.WebClient.ScriptManager.Alert("请选择订单");
            }
        }
 protected void ccmbSchool_BeforeDataBind(object sender, EventArgs e)
 {
     using (SubscriptionApplClient app = new SubscriptionApplClient())
     {
         var term = ccmbTerm.SelectedValue;
         ccmbSchool.DataSource = app.GetSchoolWithNotSub(term);
     }
 }
 protected void ccmbSchool_BeforeDataBind(object sender, EventArgs e)
 {
     using (SubscriptionApplClient app = new SubscriptionApplClient())
     {
         var term = ccmbTerm.SelectedValue;
         ccmbSchool.DataSource = app.GetSchoolWithNotSub(term);
     }
 }
        protected void ccmbPress_BeforeDataBind(object sender, EventArgs e)
        {
            using (SubscriptionApplClient app = new SubscriptionApplClient())
            {
                //取学期
                var term = ccmbTerm.SelectedValue;
                //取书商
                var booksellerId = ccmbBookseller.SelectedValue;

                ccmbPress.DataSource = app.GetPressByBookseller(term, booksellerId);
            }
        }
        protected void ccmbPress_BeforeDataBind(object sender, EventArgs e)
        {
            using (SubscriptionApplClient app = new SubscriptionApplClient())
            {
                //取学期
                var term = ccmbTerm.SelectedValue;
                //取书商
                var booksellerId = ccmbBookseller.SelectedValue;

                ccmbPress.DataSource = app.GetPressByBookseller(term, booksellerId);
            }
        }
        /// <summary>
        /// 申报列表绑定前
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void cgrdPlanSet_BeforeDataBind(object sender, EventArgs e)
        {
            //获取学院ID
            string schoolId = ccmbSchool.SelectedValue;
            //取学期
            var term = ccmbTerm.SelectedValue;

            using (SubscriptionApplClient app = new SubscriptionApplClient())
            {
                //根据学院ID获取当前学年学期的未生成订单的申报列表
                cgrdPlanSet.DataSource = app.CreateSubscriptionsBySchoolId(term, schoolId);
            }
        }
Beispiel #8
0
        /// <summary>
        /// 申报列表绑定前
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void cgrdPlanSet_BeforeDataBind(object sender, EventArgs e)
        {
            //获取出版社
            string press = ccmbPress.SelectedValue;
            //取学期
            var term = ccmbTerm.SelectedValue;

            using (SubscriptionApplClient app = new SubscriptionApplClient())
            {
                //根据学院ID获取当前学年学期的未生成订单的申报列表
                cgrdPlanSet.DataSource = app.CreateSubscriptionsByPress(term, press);
            }
        }
        /// <summary>
        /// 批量删除订单
        /// </summary>
        private void BatchDeleteSubscriptions()
        {
            using (SubscriptionApplClient app = new SubscriptionApplClient())
            {
                //取选中的订单
                cgrdPlanSet.PersistCheckState <SubscriptionForFeedbackView>();
                var subscriptions = cgrdPlanSet.GetAllCheckedDataList <SubscriptionForFeedbackView>();

                //删除
                var result = app.RemoveSubscriptions(subscriptions.ToArray());

                USCTAMis.Web.WebClient.ScriptManager.Alert(result.Message);
            }
        }
        /// <summary>
        /// 申报列表绑定前
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void cgrdPlanSet_BeforeDataBind(object sender, EventArgs e)
        {
            //取学期
            var term = ccmbTerm.SelectedValue;
            //取书商
            var booksellerId = ccmbBookseller.SelectedValue;
            //获取出版社
            string press = ccmbPress.SelectedValue;

            //取订单
            using (SubscriptionApplClient app = new SubscriptionApplClient())
            {
                cgrdPlanSet.DataSource = app.GetSubscriptions(term, booksellerId, press);
            }
        }
        /// <summary>
        /// 申报列表绑定前
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void cgrdPlanSet_BeforeDataBind(object sender, EventArgs e)
        {
            string textbookName = ctxtTextBookName.Text.Trim();
            string isbn         = ctxtISBN.Text.Trim();
            var    term         = ccmbTerm.SelectedValue;

            //查询条件为空,不执行
            if (string.IsNullOrWhiteSpace(textbookName) && string.IsNullOrWhiteSpace(isbn))
            {
                return;
            }
            //根据学院ID获取当前学年学期的未生成订单的申报列表
            using (SubscriptionApplClient app = new SubscriptionApplClient())
            {
                cgrdPlanSet.DataSource = app.CreateSubscriptionsByTextbook(term, textbookName, isbn);
            }
        }
 /// <summary>
 /// 申报列表绑定前
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void cgrdPlanSet_BeforeDataBind(object sender, EventArgs e)
 {
     string textbookName = ctxtTextBookName.Text.Trim();
     string isbn = ctxtISBN.Text.Trim();
     var term = ccmbTerm.SelectedValue;
     //查询条件为空,不执行
     if (string.IsNullOrWhiteSpace(textbookName) && string.IsNullOrWhiteSpace(isbn))
     {
         return;
     }
     //根据学院ID获取当前学年学期的未生成订单的申报列表
     using (SubscriptionApplClient app = new SubscriptionApplClient())
     {
         cgrdPlanSet.DataSource = app.CreateSubscriptionsByTextbook(term, textbookName, isbn);
     }
 }
 /// <summary>
 /// 申报列表绑定前
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void cgrdPlanSet_BeforeDataBind(object sender, EventArgs e)
 {
     //获取学院ID
     string schoolId = ccmbSchool.SelectedValue;
     //取学期
     var term = ccmbTerm.SelectedValue;
     using (SubscriptionApplClient app = new SubscriptionApplClient())
     {
         //根据学院ID获取当前学年学期的未生成订单的申报列表
         cgrdPlanSet.DataSource = app.CreateSubscriptionsBySchoolId(term, schoolId);
     }
 }
 /// <summary>
 /// 申报列表绑定前
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void cgrdPlanSet_BeforeDataBind(object sender, EventArgs e)
 {
     //获取出版社
     string press = ccmbPress.SelectedValue;
     //取学期
     var term = ccmbTerm.SelectedValue;
     using (SubscriptionApplClient app = new SubscriptionApplClient())
     {
         //根据学院ID获取当前学年学期的未生成订单的申报列表
         cgrdPlanSet.DataSource = app.CreateSubscriptionsByPress(term, press);
     }
 }
 /// <summary>
 /// 申报列表绑定前
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void cgrdPlanSet_BeforeDataBind(object sender, EventArgs e)
 {
     //取学期
     var term = ccmbTerm.SelectedValue;
     //取书商
     var booksellerId = ccmbBookseller.SelectedValue;
     //获取出版社
     string press = ccmbPress.SelectedValue;
     //取订单
     using (SubscriptionApplClient app = new SubscriptionApplClient())
     {
         cgrdPlanSet.DataSource = app.GetSubscriptions(term, booksellerId, press);
     }
 }
        /// <summary>
        /// 批量删除订单
        /// </summary>
        private void BatchDeleteSubscriptions()
        {
            using (SubscriptionApplClient app = new SubscriptionApplClient())
            {
                //取选中的订单
                cgrdPlanSet.PersistCheckState<SubscriptionForFeedbackView>();
                var subscriptions = cgrdPlanSet.GetAllCheckedDataList<SubscriptionForFeedbackView>();

                //删除
                var result = app.RemoveSubscriptions(subscriptions.ToArray());

                USCTAMis.Web.WebClient.ScriptManager.Alert(result.Message);
            }
        }