예제 #1
0
        /// <summary>
        /// 获取下一个流水号
        /// </summary>
        /// <param name="ObjName"></param>
        /// <param name="no"></param>
        /// <param name="msg"></param>
        /// <returns></returns>
        public static bool GetNextNo <T>(out int no, out string msg)
        {
            string           _ObjName = typeof(T).Name;
            SQLiteDataReader rd;

            switch (_ObjName)
            {
            case "DBPdData":
                if (!DBTool.Select("ObjName=@ObjName And LastDate=@LastDate", new DBNextNo()
                {
                    ObjName = _ObjName, LastDate = DateTime.Today
                }, string.Empty, out rd, out msg))
                {
                    no = -1;
                    return(false);
                }
                else
                {
                    if (rd.Read())
                    {
                        no = Convert.ToInt16(rd["LastNo"]) + 1;
                    }
                    else
                    {
                        no = 1;
                    }
                    rd.Close();
                    return(true);
                }

            default:
                no  = -1;
                msg = "错误:不存在对象";
                return(false);
            }
        }
예제 #2
0
        /// <summary>
        /// 移除流水
        /// </summary>
        /// <param name="msg"></param>
        /// <returns></returns>
        public static bool RemoveSalSalePay(out string msg)
        {
            int i;

            return(DBTool.ExecSql("Delete From tSalSalePay", out i, out msg));
        }
예제 #3
0
파일: CgBillDAL.cs 프로젝트: wpmyj/HS-M60
        /// <summary>
        /// 删除明细
        /// </summary>
        /// <param name="bill">明细</param>
        /// <param name="msg">返回的消息</param>
        /// <returns>是否成功</returns>
        public static bool DeleteBill(DBCgBill bill, out string msg)
        {
            int i;

            return(DBTool.Delete(bill, out i, out msg));
        }
예제 #4
0
파일: CgBillDAL.cs 프로젝트: wpmyj/HS-M60
        /// <summary>
        /// 清空采购明细
        /// </summary>
        /// <param name="msg"></param>
        /// <returns></returns>
        public static bool RemoveCgBill(out string msg)
        {
            int i = 0;

            return(DBTool.ExecSql("Delete from tCgBill", out i, out msg));
        }
예제 #5
0
파일: JhBillDAL.cs 프로젝트: wpmyj/HS-M60
        /// <summary>
        /// 移除验收单
        /// </summary>
        /// <param name="msg"></param>
        /// <returns></returns>
        public static bool RemoveJhBill(out string msg)
        {
            int i;

            return(DBTool.ExecSql("Delete From tJhBill;Delete From tJhBillInfo", out i, out msg));
        }
예제 #6
0
파일: PdDataDAL.cs 프로젝트: wpmyj/HS-M60
        /// <summary>
        /// 删除盘点数据
        /// </summary>
        /// <param name="pdData"></param>
        /// <param name="msg"></param>
        /// <returns></returns>
        public static bool DeletePdData(DBPdData pdData, out string msg)
        {
            int num;

            return(DBTool.Delete <DBPdData>(pdData, out num, out msg));
        }