예제 #1
0
        /// <summary>
        /// 获取订单销售类型
        /// </summary>
        private void GetOrderSaleType()
        {
            TB_ORDER_LEVEL1 order_1 = new TB_ORDER_LEVEL1();
            DataTable       dt      = new DataTable();

            dt = order_lv1_bll.GetOrderSaleType();
            DropDownList4.DataSource     = dt;
            DropDownList4.DataTextField  = "DICT_NAME_CN";
            DropDownList4.DataValueField = "DICT_ID";
            DropDownList4.DataBind();
        }
예제 #2
0
        protected void ButtonSure_Click(object sender, EventArgs e)
        {
            TB_ORDER_LEVEL1 order_lv1 = GetOrderFromUI();

            order_lv1.LASTUPDATEUSERID = this.Staff.StaffId;
            if (order_lv1_bll.bUpdateOrd_Order(order_lv1))
            {
                //ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "", "<script type='text/javascript'>alert('变更一级订单成功!');</script>", false);
                //触发查询功能刷新页面
                ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "", "<script type='text/javascript'>alert('变更一级订单成功!');window.parent.document.getElementById('ContentPlaceHolder1_btnSearch').click();</script>", false);
            }
        }
        /// <summary>
        /// 获取界面中的订单信息
        /// </summary>
        /// <returns></returns>
        private TB_ORDER_LEVEL1 GetOrder_level1()
        {
            TB_ORDER_LEVEL1 order_1 = new TB_ORDER_LEVEL1();

            order_1.ORDERID                = "";
            order_1.ORDERNO                = TextBoxOrderNo.Text;
            order_1.ORDERTYPE              = DropDownListOrderType.SelectedValue;
            order_1.BUYERID                = DropDownListBuyer.SelectedValue;
            order_1.SALESCONTRACTNO        = DropDownListSalesMan.SelectedValue;
            order_1.PARTIALSHIPMENTALLOWED = DropDownList3.SelectedValue;
            order_1.ORDERSTATUS            = "01";//默认新录入状态
            order_1.SALETYPE               = DropDownList4.SelectedValue;
            return(order_1);
        }
예제 #4
0
        /// <summary>
        /// 从界面获取一级订单Model
        /// </summary>
        private TB_ORDER_LEVEL1 GetOrderFromUI()
        {
            string          orderid   = Request.QueryString["orderid1"].ToString();
            TB_ORDER_LEVEL1 order_lv1 = order_lv1_bll.GetOrderOrderByID(orderid);

            order_lv1.ORDERNO   = TextBoxOrderNo.Text.Trim();
            order_lv1.ORDERTYPE = DropDownListORDERTYPE.SelectedValue;
            order_lv1.PARTIALSHIPMENTALLOWED = DropDownListALLOWED.SelectedValue;
            order_lv1.SALESCONTRACTNO        = DropDownListSALESCONTRACTNO.SelectedValue;
            order_lv1.SALETYPE         = DropDownListSALETYPE.SelectedValue;
            order_lv1.PREORDERID       = DropDownListPreOrderLv1.SelectedValue;
            order_lv1.ORDERDESC        = TextBoxMemo.Text.Trim();
            order_lv1.ORDERCHANGETIMES = order_lv1.ORDERCHANGETIMES + 1;
            return(order_lv1);
        }
예제 #5
0
        protected void ButtonSure_Click(object sender, EventArgs e)
        {
            string          orditemid = Request.QueryString["orderid2"].ToString();
            TB_ORDER_LEVEL2 order_lv2 = order_lv2_bll.GetOrderItemByID(orditemid);
            TB_ORDER_LEVEL1 order_lv1 = order_lv1_bll.GetOrderOrderByID(order_lv2.ORDERID);
            //添加三级订单
            TB_ORDER_LEVEL3 order_lv3 = new TB_ORDER_LEVEL3();

            order_lv3.ORDERDATE        = DateTime.Now;
            order_lv3.ORDERITEMID      = order_lv2.ORDERITEMID;
            order_lv3.ORDERUSERID      = this.Staff.StaffId;
            order_lv3.PRODUCEORDERNAME = TextBoxOrderItem.Text.Trim() + TextBoxOrdProduce.Text.Trim();
            //order_lv3.PRODUCEORDERNAME =  TextBoxOrdProduce.Text.Trim();//2014.06.03 三级订单随意命名

            order_lv3.PRODUCESTATE       = "01";
            order_lv3.PRODUCETYPE        = order_lv1.ORDERTYPE;
            order_lv3.QTY                = int.Parse(order_lv2.QTY);
            order_lv3.REMARK             = TextBoxMemo.Text;
            order_lv3.EXPECTCOMPLETEDATE = new DateTime();
            order_lv3.FIRST_TFCODE       = "0";
            if (TextBoxOrdProduce.Text.Trim() != "")
            {
                order_lv3.SingleVolume = int.Parse(TextBoxSingleVolume.Text.Trim().ToString());
                if (order_lv3.SingleVolume != 0)
                {
                    string message = "";
                    if (order_lv3_bll.bAddProduce(order_lv3, out message))
                    {
                        //ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "", "<script type='text/javascript'>alert('添加三级订单成功!');</script>", false);
                        //触发查询功能刷新页面
                        ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "", "<script type='text/javascript'>alert('添加三级订单成功!');window.parent.document.getElementById('ContentPlaceHolder1_btnSearch').click();</script>", false);
                    }
                    else
                    {
                        ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "", "<script type='text/javascript'>alert('" + message + "');</script>", false);
                    }
                }
                else
                {
                    ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "", "<script type='text/javascript'>alert('单量不能为0!');</script>", false);
                }
            }
            else
            {
                ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "", "<script type='text/javascript'>alert('三级订单号不能为空!');</script>", false);
            }
        }
예제 #6
0
        /// <summary>
        /// 获取界面中的订单信息
        /// </summary>
        /// <returns></returns>
        private TB_ORDER_LEVEL1 GetOrder_level1()
        {
            TB_ORDER_LEVEL1 order_1 = new TB_ORDER_LEVEL1();

            order_1.ORDERID                = "";
            order_1.ORDERNO                = TextBoxOrderNo.Text.Trim();
            order_1.ORDERTYPE              = DropDownListOrderType.SelectedValue;
            order_1.BUYERID                = TextBoxBuyer.Text;
            order_1.SALESCONTRACTNO        = DropDownListSalesMan.SelectedValue;
            order_1.PARTIALSHIPMENTALLOWED = DropDownList3.SelectedValue;
            order_1.ORDERSTATUS            = "01";//默认新录入状态
            order_1.SALETYPE               = DropDownList4.SelectedValue;
            order_1.PREORDERID             = DropDownListPreOrderLv1.SelectedValue;
            order_1.ORDERUSER              = this.Staff.StaffId;
            order_1.LASTUPDATEUSERID       = this.Staff.StaffId;
            return(order_1);
        }
예제 #7
0
        private void InitUI()
        {
            TextBoxOrderNo.ReadOnly = true;
            string id = "";

            if (Request.QueryString["orderid2"] != null)
            {
                id = Request.QueryString["orderid2"].ToString();

                TB_ORDER_LEVEL2 order_lv2 = order_lv2_bll.GetOrderItemByID(id);
                TB_ORDER_LEVEL1 order_lv1 = order_lv1_bll.GetOrderOrderByID(order_lv2.ORDERID);
                TextBoxOrderNo.Text       = order_lv1.ORDERNO;
                TextBoxENDASSETCODE.Text  = order_lv2.ENDASSETCODE;
                TextBoxENDASSETNO.Text    = order_lv2.ENDASSETNO;
                TextBoxINSPECTIONNO.Text  = order_lv2.INSPECTIONNO;
                TextBoxMemo.Text          = order_lv2.NOTE;
                TextBoxMETERCONSTANT.Text = order_lv2.METERCONSTANT.ToString();
                //TextBoxOrderNo.Text = order_lv2.ORDERID;
                TextBoxOrderNum.Text                   = order_lv2.QTY;
                TextBoxSTARTASSETCODE.Text             = order_lv2.STARTASSETCODE;
                TextBoxSTARTASSETNO.Text               = order_lv2.STARTASSETNO;
                TextBoxSuffix.Text                     = order_lv2.ITEMNO;
                TextBoxTEMPNOEND.Text                  = order_lv2.TEMPNOEND;
                TextBoxTEMPNOSTART.Text                = order_lv2.TEMPNOSTART;
                DropDownListACCURACY.SelectedValue     = order_lv2.ACCURACY;
                DropDownListFREQUENCY.SelectedValue    = order_lv2.FREQUENCY;
                DropDownListMETERCURRENT.SelectedValue = order_lv2.METERCURRENT;

                DropDownListProductIndex.SelectedValue = DropDownListProductIndex.Items.FindByText(order_lv2.prod_number) == null ? "" : DropDownListProductIndex.Items.FindByText(order_lv2.prod_number).Value;
                DropDownListPRODUCTMODEL.SelectedValue = DropDownListPRODUCTMODEL.Items.FindByText(order_lv2.prod_id) == null?"":DropDownListPRODUCTMODEL.Items.FindByText(order_lv2.prod_id).Value;
                DropDownListVOLTAGE.SelectedValue      = order_lv2.VOLTAGE;
                ChooseDate1.SelectedDate           = int.Parse(order_lv2.DELEVERYDATE.Year.ToString()) < 2000 ? DateTime.Now.AddDays(30) : order_lv2.DELEVERYDATE;
                DropDownListPro_Sort.SelectedValue = order_lv2.PRO_SORT;
            }
            else
            {
                id = Request.QueryString["orderid1"].ToString();
                TB_ORDER_LEVEL1 order_lv1 = order_lv1_bll.GetOrderOrderByID(id);
                TextBoxOrderNo.Text = order_lv1.ORDERNO;
            }
        }
예제 #8
0
        private void InitUI()
        {
            string          orderid   = Request.QueryString["orderid1"].ToString(); //Session["OrderM_orderid1"].ToString();
            TB_ORDER_LEVEL1 order_lv1 = order_lv1_bll.GetOrderOrderByID(orderid);

            TextBoxCHANGETIMES.Text                   = order_lv1.ORDERCHANGETIMES.ToString();
            TextBoxMemo.Text                          = order_lv1.ORDERDESC;
            TextBoxORDERDATE.Text                     = order_lv1.ORDERDATE.ToString("yyyy-MM-dd");
            TextBoxOrderID.Text                       = order_lv1.ORDERID;
            TextBoxOrderNo.Text                       = order_lv1.ORDERNO;
            TextBoxORDERUSER.Text                     = order_lv1_bll.GetUser(orderid);
            TextBoxUPDATEDATE.Text                    = order_lv1.LASTUPDATEDATE.ToString("yyyy-MM-dd");
            TextBoxUPDATEUSERID.Text                  = order_lv1_bll.GetChangeUser(orderid);
            DropDownListALLOWED.SelectedValue         = order_lv1.PARTIALSHIPMENTALLOWED;
            TextBoxBuyer.Text                         = order_lv1.BUYERID;
            DropDownListORDERSTATUS.SelectedValue     = order_lv1.ORDERSTATUS;
            DropDownListORDERTYPE.SelectedValue       = order_lv1.ORDERTYPE;
            DropDownListSALESCONTRACTNO.SelectedValue = order_lv1.SALESCONTRACTNO;
            DropDownListSALETYPE.SelectedValue        = order_lv1.SALETYPE;
            DropDownListPreOrderLv1.SelectedValue     = order_lv1.PREORDERID;
        }