Exemplo n.º 1
0
        /// <summary>
        /// post worker selected order data
        /// </summary>
        /// <param name="worker_no">worker_no</param>
        /// <param name="wkaOrders">order which match to the order</param>
        /// <returns>worker selected order data</returns>
        public bool PostWorkerSelectedOrderData(string worker_no, List <Dictionary <string, string> > wkaOrders)
        {
            IMainDal dal = new MainDal();

            if (string.IsNullOrWhiteSpace(worker_no))
            {
                return(false);
            }
            if (wkaOrders == null || wkaOrders.Count == 0)
            {
                return(false);
            }
            try
            {
                wkaOrders.ForEach(a =>
                {
                    Dictionary <string, object> pms = new Dictionary <string, object>();
                    pms.Add("wka_no", a.Keys.Contains("wka_no") ? a["wka_no"] : string.Empty);
                    pms.Add("mo_no", a.Keys.Contains("mo_no") ? a["mo_no"] : string.Empty);
                    pms.Add("worker_no", worker_no);
                    dal.CUDByPms("Operator", "PostWorkerSelectedOrderData", pms);
                });
                return(true);
            }
            catch (Exception ex)
            {
                LogTool.Error(ex);
                return(false);
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// post all wkc has been selected by worker
        /// </summary>
        /// <param name="worker_no">current worker no</param>
        /// <param name="wkaNos">wka has been selected</param>
        /// <returns>is post action success</returns>
        public bool PostWorkerSelectedWka(string worker_no, List <string> wkaNos)
        {
            IMainDal dal = new MainDal();
            Dictionary <string, object> pms = new Dictionary <string, object>();

            pms.Add("worker_no", worker_no);
            pms.Add("wka_no", wkaNos);
            return(dal.CUDByPms("Operator", "PostWorkerSelectedWka", pms) > 0);
        }
Exemplo n.º 3
0
        /// <summary>
        /// query int
        /// </summary>
        /// <param name="sqlFileName">sql file name</param>
        /// <param name="sqlId">sql id</param>
        /// <param name="pmsList">query parameter list</param>
        /// <returns>int result</returns>
        public virtual int QueryInt(string sqlFileName, string sqlId, List <Dictionary <string, object> > pmsList)
        {
            IMainDal dal = new MainDal();

            return(dal.CUDByPms(sqlFileName, sqlId, pmsList));
        }