protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         Label labTextInWindow = Window2.FindControl("labTextInWindow") as Label;
         labTextInWindow.Text = "这是初始值!";
     }
 }
        protected void LoadDate()
        {
            DatePicker dpUp_DateBeg = Window2.FindControl("A").FindControl("dpUp_DateBeg") as DatePicker;

            dpUp_DateBeg.SelectedDate = ConvertHelper.StringToDatetime(DateTime.Now.ToString("yyyy-MM-dd 00:00:01"));
            DatePicker dpUp_DateEnd = Window2.FindControl("A").FindControl("dpUp_DateEnd") as DatePicker;

            dpUp_DateEnd.SelectedDate = ConvertHelper.StringToDatetime(DateTime.Now.ToString("yyyy-MM-dd 23:59:59"));

            DatePicker dpEXPECT_DATEBeg = Window2.FindControl("B").FindControl("dpEXPECT_DATEBeg") as DatePicker;

            dpEXPECT_DATEBeg.SelectedDate = ConvertHelper.StringToDatetime(DateTime.Now.ToString("yyyy-MM-dd 00:00:01"));
            DatePicker dpEXPECT_DATEEnd = Window2.FindControl("B").FindControl("dpEXPECT_DATEEnd") as DatePicker;

            dpEXPECT_DATEEnd.SelectedDate = ConvertHelper.StringToDatetime(DateTime.Now.ToString("yyyy-MM-dd 23:59:59"));

            Window2.Title = "查询";
        }
        /// <summary>
        /// 汇整
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void ButtonArchiveOrders_Click(object sender, EventArgs e)
        {
            DatePicker dpUp_DateBeg = Window2.FindControl("A").FindControl("dpUp_DateBeg") as DatePicker;

            dpUp_DateBeg.SelectedDate = ConvertHelper.StringToDatetime(DateTime.Now.ToString("yyyy-MM-dd 00:00:00"));
            DatePicker dpUp_DateEnd = Window2.FindControl("A").FindControl("dpUp_DateEnd") as DatePicker;

            dpUp_DateEnd.SelectedDate = ConvertHelper.StringToDatetime(DateTime.Now.AddDays(1).ToString("yyyy-MM-dd 00:00:00"));

            DatePicker dpEXPECT_DATEBeg = Window2.FindControl("B").FindControl("dpEXPECT_DATEBeg") as DatePicker;

            dpEXPECT_DATEBeg.SelectedDate = ConvertHelper.StringToDatetime(DateTime.Now.ToString("yyyy-MM-dd 00:00:00"));
            DatePicker dpEXPECT_DATEEnd = Window2.FindControl("B").FindControl("dpEXPECT_DATEEnd") as DatePicker;

            dpEXPECT_DATEEnd.SelectedDate = ConvertHelper.StringToDatetime(DateTime.Now.AddDays(1).ToString("yyyy-MM-dd 00:00:00"));

            Window2.Title  = "汇整订单";
            Window2.Hidden = false;
        }
Exemple #4
0
        protected void Grid2AddNewRow_Click(object sender, EventArgs e)
        {
            FineUI.Grid Grid3 = Window2.FindControl("PanelA").FindControl("Grid3") as FineUI.Grid;

            int[]  selections = Grid3.SelectedRowIndexArray;
            string _ORDDEP_ID = hidORDDEP_ID.Text.ToString();
            string result     = "";

            if (!String.IsNullOrEmpty(_ORDDEP_ID))
            {
                foreach (int i in selections)
                {
                    int    _Id         = ConvertHelper.Cint(Grid3.DataKeys[i][0].ToString());
                    var    model       = new PROD_DEP(x => x.Id == _Id);
                    string checkResult = CheckDataAddDep(model.DEP_ID);
                    if (!String.IsNullOrEmpty(checkResult))
                    {
                        result = result + checkResult + Environment.NewLine;
                        continue;
                    }

                    JObject deObject = new JObject();
                    deObject.Add("Id1", "0");
                    deObject.Add("ORDDEP_ID1", _ORDDEP_ID);
                    deObject.Add("DEP_ID1", model.DEP_ID);
                    deObject.Add("DEP_NAME1", model.DEP_NAME);
                    deObject.Add("Meno", " ");
                    deObject.Add("USABLE1", true);
                    var    OlUser = OnlineUsersBll.GetInstence().GetModelForCache(x => x.UserHashKey == Session[OnlineUsersTable.UserHashKey].ToString());
                    string lgname = OlUser.Manager_LoginName;
                    deObject.Add("CRT_USER_ID1", lgname);
                    deObject.Add("CRT_DATETIME1", DateTime.Now.ToString());
                    deObject.Add("MOD_USER_ID1", OlUser.Manager_LoginName);
                    deObject.Add("MOD_DATETIME1", DateTime.Now.ToString());
                    Grid2.AddNewRecord(deObject, true);
                }
            }
            if (!String.IsNullOrEmpty(result.Trim()))
            {
                FineUI.Alert.ShowInParent(result, FineUI.MessageBoxIcon.Information);
            }
        }
        protected void btnSubmit1_Click(object sender, EventArgs e)
        {
            Grid2.Rows.Clear();

            //判断
            FineUI.RadioButton RaddpUp_Date   = Window2.FindControl("A").FindControl("RaddpUp_Date") as FineUI.RadioButton;
            FineUI.RadioButton RadEXPECT_DATE = Window2.FindControl("B").FindControl("RadEXPECT_DATE") as FineUI.RadioButton;

            if (RaddpUp_Date.Checked == false && RadEXPECT_DATE.Checked == false)
            {
                Alert.Show("请选择时间");
                return;
            }

            string Start_Time = "";
            string End_Time   = "";

            //获取时间
            DatePicker dpUp_DateBeg  = Window2.FindControl("A").FindControl("dpUp_DateBeg") as DatePicker;
            DateTime   dt_up_date_bg = ConvertHelper.StringToDatetime(DateTime.Parse(dpUp_DateBeg.SelectedDate.ToString()).ToString("yyyy-MM-dd 00:00:00"));

            DatePicker dpUp_DateEnd   = Window2.FindControl("A").FindControl("dpUp_DateEnd") as DatePicker;
            DateTime   dt_up_date_end = ConvertHelper.StringToDatetime(DateTime.Parse(dpUp_DateEnd.SelectedDate.ToString()).ToString("yyyy-MM-dd 23:59:59"));

            DatePicker dpEXPECT_DATEBeg  = Window2.FindControl("B").FindControl("dpEXPECT_DATEBeg") as DatePicker;
            DateTime   dt_expect_date_bg = ConvertHelper.StringToDatetime(DateTime.Parse(dpEXPECT_DATEBeg.SelectedDate.ToString()).ToString("yyyy-MM-dd 00:00:00"));

            DatePicker dpEXPECT_DATEEnd   = Window2.FindControl("B").FindControl("dpEXPECT_DATEEnd") as DatePicker;
            DateTime   dt_expect_date_end = ConvertHelper.StringToDatetime(DateTime.Parse(dpEXPECT_DATEEnd.SelectedDate.ToString()).ToString("yyyy-MM-dd 23:59:59"));


            int IsTime = 1;

            if (RaddpUp_Date.Checked)
            {
                IsTime     = 0;
                Start_Time = dt_up_date_bg.ToString();
                End_Time   = dt_up_date_end.ToString();
            }

            if (RadEXPECT_DATE.Checked)
            {
                IsTime     = 1;
                Start_Time = dt_expect_date_bg.ToString();
                End_Time   = dt_expect_date_end.ToString();
            }

            string shop_id    = SHOP_hidId.Text.Trim();
            string shop_name  = OnlineUsersBll.GetInstence().GetUserOnlineInfo("SHOP_NAME1").ToString();
            string shop_idStr = ORDER00Table.SHOP_ID;

            if (shop_name.Contains("区域中心"))
            {
                IsTime = -1;
            }

            Session["SerchPars_session_Orders"] = Session["SerchPars_session"] = IsTime + "," + Start_Time + "," + End_Time;

            BandGrid2(shop_name, shop_idStr, shop_id, Start_Time, End_Time, IsTime);

            Window2.Hidden = true;
        }
Exemple #6
0
        protected void btnImport_Click(object sender, EventArgs e)
        {
            //判断
            FineUI.RadioButton RaddpUp_Date   = Window2.FindControl("A").FindControl("RaddpUp_Date") as FineUI.RadioButton;
            FineUI.RadioButton RadEXPECT_DATE = Window2.FindControl("B").FindControl("RadEXPECT_DATE") as FineUI.RadioButton;

            if (RaddpUp_Date.Checked == false && RadEXPECT_DATE.Checked == false)
            {
                Alert.Show("请选择时间");
                return;
            }

            string Start_Time = "";
            string End_Time   = "";

            //参数
            Random ran               = new Random();
            string SHOP_ID           = OnlineUsersBll.GetInstence().GetUserOnlineInfo("SHOP_ID").ToString();
            string COL_ID            = SHOP_ID + "CL" + DateTime.Now.ToString("yyyy-MM-dd") + +ran.Next(1000, 9999);
            string manager_LoginName = OnlineUsersBll.GetInstence().GetUserOnlineInfo("Manager_LoginName").ToString();//登录名

            int IsTime = 1;

            if (RaddpUp_Date.Checked)
            {
                //获取时间
                DatePicker dpUp_DateBeg  = Window2.FindControl("A").FindControl("dpUp_DateBeg") as DatePicker;
                DateTime   dt_up_date_bg = ConvertHelper.StringToDatetime(dpUp_DateBeg.SelectedDate.ToString());

                DatePicker dpUp_DateEnd   = Window2.FindControl("A").FindControl("dpUp_DateEnd") as DatePicker;
                DateTime   dt_up_date_end = ConvertHelper.StringToDatetime(dpUp_DateEnd.SelectedDate.ToString());

                IsTime     = 0;
                Start_Time = dt_up_date_bg.ToString();
                End_Time   = dt_up_date_end.ToString();
            }

            if (RadEXPECT_DATE.Checked)
            {
                DatePicker dpEXPECT_DATEBeg  = Window2.FindControl("B").FindControl("dpEXPECT_DATEBeg") as DatePicker;
                DateTime   dt_expect_date_bg = ConvertHelper.StringToDatetime(dpEXPECT_DATEBeg.SelectedDate.ToString());

                DatePicker dpEXPECT_DATEEnd   = Window2.FindControl("B").FindControl("dpEXPECT_DATEEnd") as DatePicker;
                DateTime   dt_expect_date_end = ConvertHelper.StringToDatetime(dpEXPECT_DATEEnd.SelectedDate.ToString());

                IsTime     = 1;
                Start_Time = dt_expect_date_bg.ToString();
                End_Time   = dt_expect_date_end.ToString();
            }

            int ex_int = TAKEIN00Bll.GetInstence().LeadIntoProductPlanList(Start_Time, End_Time, IsTime.ToString(), SHOP_ID, manager_LoginName);

            if (ex_int == 0)
            {
                Alert.Show("引入成功!");
            }
            else
            {
                Alert.Show("引入失败!请重新引入!");
            }

            LoadData();
        }
        /// <summary>
        /// 汇整
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnArchive_Click(object sender, EventArgs e)
        {
            //判断
            FineUI.RadioButton RaddpUp_Date   = Window2.FindControl("A").FindControl("RaddpUp_Date") as FineUI.RadioButton;
            FineUI.RadioButton RadEXPECT_DATE = Window2.FindControl("B").FindControl("RadEXPECT_DATE") as FineUI.RadioButton;

            if (RaddpUp_Date.Checked == false && RadEXPECT_DATE.Checked == false)
            {
                Alert.Show("请选择时间");
                return;
            }

            string Start_Time = "";
            string End_Time   = "";

            //获取时间
            DatePicker dpUp_DateBeg  = Window2.FindControl("A").FindControl("dpUp_DateBeg") as DatePicker;
            DateTime   dt_up_date_bg = ConvertHelper.StringToDatetime(dpUp_DateBeg.SelectedDate.ToString());

            DatePicker dpUp_DateEnd   = Window2.FindControl("A").FindControl("dpUp_DateEnd") as DatePicker;
            DateTime   dt_up_date_end = ConvertHelper.StringToDatetime(dpUp_DateEnd.SelectedDate.ToString());

            DatePicker dpEXPECT_DATEBeg  = Window2.FindControl("B").FindControl("dpEXPECT_DATEBeg") as DatePicker;
            DateTime   dt_expect_date_bg = ConvertHelper.StringToDatetime(dpEXPECT_DATEBeg.SelectedDate.ToString());

            DatePicker dpEXPECT_DATEEnd   = Window2.FindControl("B").FindControl("dpEXPECT_DATEEnd") as DatePicker;
            DateTime   dt_expect_date_end = ConvertHelper.StringToDatetime(dpEXPECT_DATEEnd.SelectedDate.ToString());

            //参数
            Random ran               = new Random();
            string SHOP_ID           = OnlineUsersBll.GetInstence().GetUserOnlineInfo("SHOP_ID").ToString();
            string COL_ID            = SHOP_ID + "CL" + DateTime.Now.ToString("yyyy-MM-dd") + +ran.Next(1000, 9999);
            string manager_LoginName = OnlineUsersBll.GetInstence().GetUserOnlineInfo("Manager_LoginName").ToString();//登录名

            int IsTime = 1;

            if (RaddpUp_Date.Checked)
            {
                IsTime     = 0;
                Start_Time = dt_up_date_bg.ToString();
                End_Time   = dt_up_date_end.ToString();
            }

            if (RadEXPECT_DATE.Checked)
            {
                IsTime     = 1;
                Start_Time = dt_expect_date_bg.ToString();
                End_Time   = dt_expect_date_end.ToString();
            }

            string ORD_DEP_ID_C = "";//汇整者的 部门

            int ex_int = Col_Order00Bll.GetInstence().ADD_ARCHIVEORDERS(manager_LoginName, ORD_DEP_ID_C, SHOP_ID, Start_Time, End_Time, IsTime);

            if (ex_int == 0)
            {
                Alert.Show("汇整成功!");
            }
            else
            {
                Alert.Show("汇整失败!请重新汇整!");
            }

            LoadData();
        }
        protected void btnChangeText_Click(object sender, EventArgs e)
        {
            Label labTextInWindow = Window2.FindControl("labTextInWindow") as Label;

            labTextInWindow.Text = "这是修改后的值!" + DateTime.Now.ToLongTimeString();
        }
Exemple #9
0
 public void LoadDepData()
 {
     FineUI.Grid Grid3 = Window2.FindControl("PanelA").FindControl("Grid3") as FineUI.Grid;
     PROD_DEPBll.GetInstence().BindGrid(Grid3, 0, 0, null, null);
 }
Exemple #10
0
        /// <summary>
        /// 汇整
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnSearch_Click(object sender, EventArgs e)
        {
            //判断
            FineUI.RadioButton RaddpUp_Date   = Window2.FindControl("A").FindControl("RaddpUp_Date") as FineUI.RadioButton;
            FineUI.RadioButton RadEXPECT_DATE = Window2.FindControl("B").FindControl("RadEXPECT_DATE") as FineUI.RadioButton;

            if (RaddpUp_Date.Checked == false && RadEXPECT_DATE.Checked == false)
            {
                Alert.Show("请选择时间");
                return;
            }

            string Start_Time = "";
            string End_Time   = "";

            //获取时间
            DatePicker dpUp_DateBeg  = Window2.FindControl("A").FindControl("dpUp_DateBeg") as DatePicker;
            DateTime   dt_up_date_bg = ConvertHelper.StringToDatetime(dpUp_DateBeg.SelectedDate.ToString());

            DatePicker dpUp_DateEnd   = Window2.FindControl("A").FindControl("dpUp_DateEnd") as DatePicker;
            DateTime   dt_up_date_end = ConvertHelper.StringToDatetime(dpUp_DateEnd.SelectedDate.ToString());

            DatePicker dpEXPECT_DATEBeg  = Window2.FindControl("B").FindControl("dpEXPECT_DATEBeg") as DatePicker;
            DateTime   dt_expect_date_bg = ConvertHelper.StringToDatetime(dpEXPECT_DATEBeg.SelectedDate.ToString());

            DatePicker dpEXPECT_DATEEnd   = Window2.FindControl("B").FindControl("dpEXPECT_DATEEnd") as DatePicker;
            DateTime   dt_expect_date_end = ConvertHelper.StringToDatetime(dpEXPECT_DATEEnd.SelectedDate.ToString());

            //参数
            Random ran               = new Random();
            string SHOP_ID           = OnlineUsersBll.GetInstence().GetUserOnlineInfo("SHOP_ID").ToString();;
            string COL_ID            = SHOP_ID + "CL" + DateTime.Now.ToString("yyyy-MM-dd") + +ran.Next(1000, 9999);
            string manager_LoginName = OnlineUsersBll.GetInstence().GetUserOnlineInfo("Manager_LoginName").ToString();//登录名

            conditionList = new List <ConditionFun.SqlqueryCondition>();

            int IsTime = 1;

            if (RaddpUp_Date.Checked)
            {
                IsTime     = 0;
                Start_Time = dt_up_date_bg.ToString();
                End_Time   = dt_up_date_end.ToString();

                conditionList.Add(new ConditionFun.SqlqueryCondition(ConstraintType.Where, PLAN00Table.INPUT_DATE, Comparison.BetweenAnd, Start_Time, false, false));
                conditionList.Add(new ConditionFun.SqlqueryCondition(ConstraintType.Where, PLAN00Table.INPUT_DATE, Comparison.BetweenAnd, End_Time, false, false));
            }

            if (RadEXPECT_DATE.Checked)
            {
                IsTime     = 1;
                Start_Time = dt_expect_date_bg.ToString();
                End_Time   = dt_expect_date_end.ToString();

                conditionList.Add(new ConditionFun.SqlqueryCondition(ConstraintType.Where, PLAN00Table.EXPECT_DATE, Comparison.BetweenAnd, Start_Time, false, false));
                conditionList.Add(new ConditionFun.SqlqueryCondition(ConstraintType.Where, PLAN00Table.EXPECT_DATE, Comparison.BetweenAnd, End_Time, false, false));
            }

            Window2.Hidden = true;

            bll.BindGrid(Grid1, 0, 0, conditionList, sortList);
        }