/// <summary>
        /// 引入按钮
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public void BtnYR_Click(Object sender, EventArgs e)
        {
            string _shopid   = ddlIN_SHOP.SelectedValue;
            string _stock_id = ddlSTOCK_ID.SelectedValue;

            if (ButtonYR.Text.Equals("取消引入"))
            {
                SPs.IN_ORDER00_OUT00_Cancel(tbxOUT_ID.Text);
                FineUI.Alert.ShowInParent("取消引入成功", FineUI.MessageBoxIcon.Information);
                return;
            }
            if (string.IsNullOrEmpty(_shopid))
            {
                FineUI.Alert.ShowInParent("到货分店不能为空", FineUI.MessageBoxIcon.Information);
                return;
            }

            if (string.IsNullOrEmpty(_stock_id))
            {
                FineUI.Alert.ShowInParent("到货分店不能为空", FineUI.MessageBoxIcon.Information);
                return;
            }
            FineUI.DatePicker wst = Window4.FindControl("PanelGrid5").FindControl("Panel_Search2").FindControl("dpSt") as FineUI.DatePicker;
            FineUI.DatePicker wet = Window4.FindControl("PanelGrid5").FindControl("Panel_Search2").FindControl("dpEt") as FineUI.DatePicker;
            wst.SelectedDate = DateTime.Now.Date.AddDays(-1);
            wet.SelectedDate = DateTime.Now.Date;
            Window4.Hidden   = false;
            Window3.Hidden   = true;
        }
        /// <summary>
        /// 检索条件
        /// </summary>
        /// <returns></returns>
        public List <ConditionFun.SqlqueryCondition> OrderCondition()
        {
            List <ConditionFun.SqlqueryCondition> orderCon = new List <ConditionFun.SqlqueryCondition>();

            FineUI.RadioButtonList datetype = Window4.FindControl("PanelGrid5").FindControl("Panel_Search2").FindControl("ddrDataType") as FineUI.RadioButtonList;
            string rValue = datetype.SelectedValue;

            FineUI.DatePicker wst       = Window4.FindControl("PanelGrid5").FindControl("Panel_Search2").FindControl("dpSt") as FineUI.DatePicker;
            FineUI.DatePicker wet       = Window4.FindControl("PanelGrid5").FindControl("Panel_Search2").FindControl("dpEt") as FineUI.DatePicker;
            string            starttime = wst.Text;
            string            endtime   = wet.Text;

            if (rValue == "1")
            {
                orderCon.Add(new ConditionFun.SqlqueryCondition(ConstraintType.Where, OUT_BACK00Table.INPUT_DATE, Comparison.LessOrEquals, endtime, false, false));
                orderCon.Add(new ConditionFun.SqlqueryCondition(ConstraintType.And, OUT_BACK00Table.INPUT_DATE, Comparison.GreaterOrEquals, starttime, false, false));
            }
            //FineUI.DropDownList _ddlShopName = Window4.FindControl("PanelGrid5").FindControl("Panel_Search2").FindControl("w4_ddlSHOP_NAME") as FineUI.DropDownList;
            //string _shopid = _ddlShopName.SelectedValue;
            //if (!String.IsNullOrEmpty(_shopid))
            //{
            //    orderCon.Add(new ConditionFun.SqlqueryCondition(ConstraintType.And, ORDER00Table.SHOP_ID, Comparison.Equals, _shopid, false, false));
            //}
            return(orderCon);
        }
        /// <summary>
        /// 检索条件
        /// </summary>
        /// <returns></returns>
        public List <ConditionFun.SqlqueryCondition> OrderCondition()
        {
            List <ConditionFun.SqlqueryCondition> orderCon = new List <ConditionFun.SqlqueryCondition>();

            FineUI.RadioButtonList datetype = Window4.FindControl("PanelGrid5").FindControl("Panel_Search2").FindControl("ddrDataType") as FineUI.RadioButtonList;
            string rValue = datetype.SelectedValue;

            FineUI.DatePicker wst       = Window4.FindControl("PanelGrid5").FindControl("Panel_Search2").FindControl("dpSt") as FineUI.DatePicker;
            FineUI.DatePicker wet       = Window4.FindControl("PanelGrid5").FindControl("Panel_Search2").FindControl("dpEt") as FineUI.DatePicker;
            string            starttime = wst.Text;
            string            endtime   = wet.Text;

            string _shopid = ddlIN_SHOP.SelectedValue;

            orderCon.Add(new ConditionFun.SqlqueryCondition(ConstraintType.And, ORDER00Table.SHOP_ID, Comparison.Equals, _shopid, false, false));
            orderCon.Add(new ConditionFun.SqlqueryCondition(ConstraintType.And, ORDER00Table.STATUS, Comparison.GreaterOrEquals, "2", false, false));
            orderCon.Add(new ConditionFun.SqlqueryCondition(ConstraintType.And, ORDER00Table.EXPORTED, Comparison.GreaterOrEquals, "0", false, false));
            if (rValue == "1")
            {
                orderCon.Add(new ConditionFun.SqlqueryCondition(ConstraintType.And, ORDER00Table.INPUT_DATE, Comparison.LessOrEquals, endtime, false, false));
                orderCon.Add(new ConditionFun.SqlqueryCondition(ConstraintType.And, ORDER00Table.INPUT_DATE, Comparison.GreaterOrEquals, starttime, false, false));
            }
            else
            {
                orderCon.Add(new ConditionFun.SqlqueryCondition(ConstraintType.And, ORDER00Table.EXPECT_DATE, Comparison.LessOrEquals, endtime, false, false));
                orderCon.Add(new ConditionFun.SqlqueryCondition(ConstraintType.And, ORDER00Table.EXPECT_DATE, Comparison.GreaterOrEquals, starttime, false, false));
            }



            return(orderCon);
        }
        /// <summary>
        /// 添加商品
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void ButtonStockAdd_Click(object sender, EventArgs e)
        {
            FineUI.DropDownList ddlstock             = Window4.FindControl("PanelGrid4").FindControl("Panel_Search").FindControl("window_ddl_Stock") as FineUI.DropDownList;
            FineUI.DropDownList _window_ddl_INV_TYPE = Window4.FindControl("PanelGrid4").FindControl("Panel_Search").FindControl("window_ddl_INV_TYPE") as FineUI.DropDownList;
            FineUI.DropDownList _window_ddl_Stock    = Window4.FindControl("PanelGrid4").FindControl("Panel_Search").FindControl("window_ddl_Stock") as FineUI.DropDownList;
            string invType  = _window_ddl_INV_TYPE.SelectedValue;
            string invStock = _window_ddl_Stock.SelectedValue;

            ddlINV_TYPE.SelectedValue = invType;
            ddlstock.SelectedValue    = invStock;
            string _SHOP_ID = ddlSHOP_NAME.SelectedValue;

            if (invType == "4")
            {
                Grid2.DataSource = null;
                Grid2.DataBind();
                Toolbar21111.Enabled = true;
            }
            else
            {
                DataTable dt = new DataTable();
                dt = (DataTable)SPs.GET_STOCK01_PROD(invStock, "", _SHOP_ID, invType).ExecuteDataTable();
                Grid2.DataSource = dt;
                Grid2.DataBind();
                Toolbar21111.Enabled = false;
            }
        }
 /// <summary>
 /// 新增仓库的商品
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 public void btn_DetailAdd2()
 {
     //string Pur_status = ddlStatus.SelectedValue;
     FineUI.Panel P_search = Window4.FindControl("PanelGrid4").FindControl("Panel_Search") as FineUI.Panel;
     P_search.Hidden = false;
     FineUI.DropDownList ddlstock = Window4.FindControl("PanelGrid4").FindControl("Panel_Search").FindControl("window_ddl_Stock") as FineUI.DropDownList;
     STOCKBll.GetInstence().BandDropDownListStock(this, ddlstock);
     Window4.Hidden = false;
 }
Beispiel #6
0
        protected void ButtonOrderAdd_Click(Object sender, EventArgs e)
        {
            FineUI.Grid Grid4      = Window4.FindControl("PanelGrid5").FindControl("Grid4") as FineUI.Grid;
            int[]       selections = Grid4.SelectedRowIndexArray;
            //tbxRELATE_ID.Text = Grid4.DataKeys[0][0].ToString();
            DataTable Inda = SPs.IN_Purchase00_TAKEIN11(Grid4.DataKeys[selections[0]][0].ToString(), tbxTAKEIN_ID.Text, ddlSHOP_NAME.SelectedValue).ExecuteDataTable();

            Grid2.DataSource = Inda;
            Grid2.DataBind();
            Toolbar21111.Enabled = false;
        }
        protected void ButtonOrderAdd_Click(Object sender, EventArgs e)
        {
            FineUI.Grid Grid4      = Window4.FindControl("PanelGrid5").FindControl("Grid4") as FineUI.Grid;
            int[]       selections = Grid4.SelectedRowIndexArray;
            tbxRELATE_ID.Text = Grid4.DataKeys[0][0].ToString();
            foreach (int i in selections)
            {
                List <ConditionFun.SqlqueryCondition> order00con = new List <ConditionFun.SqlqueryCondition>();
                order00con.Add(new ConditionFun.SqlqueryCondition(ConstraintType.Where, OUT_BACK01Table.BK_ID, Comparison.Equals, Grid4.DataKeys[i][0].ToString(), false, false));
                List <string> colList = new List <string>();
                colList.Add("SHOP_ID");
                colList.Add("PROD_ID");
                colList.Add("QUANTITY");
                colList.Add("STD_UNIT");
                colList.Add("STD_CONVERT");
                colList.Add("STD_QUAN");
                colList.Add("STD_PRICE");
                //colList.Add("COST_PRICE");
                //colList.Add("");预留采购单位类别
                DataTable da = OUT_BACK01Bll.GetInstence().GetDataTable(false, 0, colList, 0, 0, order00con, null);

                foreach (DataRow dr in da.Rows)
                {
                    string  _shopid  = dr["SHOP_ID"].ToString();
                    string  _PROD_ID = dr["PROD_ID"].ToString();
                    var     model    = new SHOP00(x => x.SHOP_ID == _shopid);
                    var     model2   = new PRODUCT00(x => x.PROD_ID == _PROD_ID);
                    int     rowCount = Grid2.Rows.Count;
                    JObject deObject = new JObject();
                    deObject.Add("Id01", "0");
                    deObject.Add("SHOP_ID01", dr["SHOP_ID"].ToString());
                    deObject.Add("SHOP_NAME01", model.SHOP_NAME1);
                    deObject.Add("IB_ID01", tbxIB_ID.Text);
                    deObject.Add("SNo01", rowCount + 1);
                    deObject.Add("PROD_ID01", dr["PROD_ID"].ToString());
                    deObject.Add("PROD_NAME01", model2.PROD_NAME1);
                    deObject.Add("QUANTITY01", dr["QUANTITY"].ToString());
                    deObject.Add("STD_TYPE01", dr["STD_UNIT"].ToString());
                    deObject.Add("STD_UNIT01", dr["STD_UNIT"].ToString());
                    deObject.Add("STD_CONVERT01", dr["STD_CONVERT"].ToString());
                    deObject.Add("STD_QUAN01", dr["STD_QUAN"].ToString());
                    deObject.Add("STD_PRICE01", dr["STD_PRICE"].ToString());
                    deObject.Add("COST01", dr["STD_PRICE"].ToString());
                    deObject.Add("QUAN101", dr["STD_QUAN"].ToString());
                    deObject.Add("QUAN201", dr["STD_QUAN"].ToString());
                    deObject.Add("MEMO01", "");
                    deObject.Add("BAT_NO", "");
                    Grid2.AddNewRecord(deObject, true);
                }
            }
        }
Beispiel #8
0
 /// <summary>
 /// 引入按钮
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 public void BtnYR_Click(Object sender, EventArgs e)
 {
     if (ButtonYR.Text.Equals("取消引入"))
     {
         SPs.IN_Purchase00_TAKEIN11_Cancel(tbxTAKEIN_ID.Text);
         FineUI.Alert.ShowInParent("取消引入成功", FineUI.MessageBoxIcon.Information);
         return;
     }
     FineUI.DatePicker wst = Window4.FindControl("PanelGrid5").FindControl("Panel_Search2").FindControl("dpSt") as FineUI.DatePicker;
     FineUI.DatePicker wet = Window4.FindControl("PanelGrid5").FindControl("Panel_Search2").FindControl("dpEt") as FineUI.DatePicker;
     wst.SelectedDate = DateTime.Now.Date.AddDays(-1);
     wet.SelectedDate = DateTime.Now.Date;
     Window4.Hidden   = false;
     Window3.Hidden   = true;
 }
 /// <summary>
 /// 引入按钮
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 public void BtnYR_Click(Object sender, EventArgs e)
 {
     //string Pur_status = ddlStatus.SelectedValue;
     //FineUI.Panel P_search = Window3.FindControl("PanelGrid4").FindControl("Panel_Search") as FineUI.Panel;
     //P_search.Hidden = false;
     //FineUI.Button B_BtnSearchCon = Window3.FindControl("PanelGrid4").FindControl("tool_btn").FindControl("BtnSearchCon") as FineUI.Button;
     //FineUI.Button B_BtnAddCon = Window3.FindControl("PanelGrid4").FindControl("tool_btn").FindControl("BtnAddCon") as FineUI.Button;
     //B_BtnSearchCon.Hidden = false;
     //B_BtnAddCon.Hidden = false;
     FineUI.DatePicker wst = Window4.FindControl("PanelGrid5").FindControl("Panel_Search2").FindControl("dpSt") as FineUI.DatePicker;
     FineUI.DatePicker wet = Window4.FindControl("PanelGrid5").FindControl("Panel_Search2").FindControl("dpEt") as FineUI.DatePicker;
     wst.SelectedDate = DateTime.Now.Date.AddDays(-1);
     wet.SelectedDate = DateTime.Now.Date;
     Window4.Hidden   = false;
     Window3.Hidden   = true;
 }
 protected void ButtonOrderSearch_Click(Object sender, EventArgs e)
 {
     FineUI.Grid grid4 = Window4.FindControl("PanelGrid5").FindControl("Grid4") as FineUI.Grid;
     OUT_BACK00Bll.GetInstence().BindGrid(grid4, 0, 0, OrderCondition(), null);
 }