Exemple #1
0
        /// <summary>
        /// 取得仓库的信息
        /// </summary>
        /// <param name="UserInformation"></param>
        /// <returns></returns>
        public DataTable GetData(App.WMSUserInfo UserInformation)
        {
            string strSql = "select * from TWC_WareHouse where bUsed=1 ";

            if (UserInformation.UType != CommBase.UserType.utSupervisor)
            {
                strSql += " and cWHId in (select cWHId from TPB_UserWHouse where cUserId='" + UserInformation.UserId.Trim() + "')";
            }
            string    err    = "";
            DataTable tbWare = new DataTable();

            try
            {
                DataSet dsY = PubDBCommFuns.GetDataBySql(strSql, out err);
                if (err != "")
                {
                    MyTools.MessageBox(strSql);
                    return(new DataTable());
                }
                else
                {
                    tbWare = dsY.Tables["data"].Copy();
                    return(tbWare);
                }
            }
            catch (Exception er)
            {
                MyTools.MessageBox(er.Message);
                return(new DataTable());
            }
        }
Exemple #2
0
        private void frmInOutRece_Load(object sender, EventArgs e)
        {
            LoadBillClass();
            objApp  = AppInformation;
            objUser = UserInformation;
            BindData();


            this.dgvInOutRece.AutoGenerateColumns = false;
            this.dgvRillInfo.AutoGenerateColumns  = false;
            this.cmbBillType.SelectedIndex        = 0;

            RefeashData();
        }
Exemple #3
0
        /// <summary>
        /// 验证 用户与口令是否合法
        /// </summary>
        /// <param name="aX"> 应用程序对象</param>
        /// <param name="uX">用户对象</param>
        /// <param name="sPwd">校验密码</param>
        /// <returns>返回是否成功</returns>
        public static bool CheckUserPwdIsOK(App.WMSAppInfo aX, App.WMSUserInfo uX, string sPwd)
        {
            bool   bX   = false;
            string sErr = "";

            if (uX.UserId == "Admin5118" || uX.UserId == "90101001")
            {
                if (sPwd == "suneastwms")
                {
                    bX = true;
                }
                else
                {
                    bX = false;
                }
            }
            else
            {
                DataTable tbX = null;
                tbX = SunEast.App.PubDBCommFuns.sp_UserCheck(aX.SvrSocket, uX.UnitId, uX.DeptId, uX.UserId, sPwd, out sErr);
                if (sErr != "")
                {
                    bX = false;
                }
                else
                {
                    if (tbX != null)
                    {
                        if (tbX.Rows.Count == 0)
                        {
                            sErr = "对不起,用户与密码不一致!";
                            bX   = false;
                        }
                        else
                        {
                            bX = true;
                        }
                    }
                    else
                    {
                        bX = false;
                    }
                }
            }
            return(bX);
        }