예제 #1
0
        public int UpdateTransfer(TrackOfflineReq d, SqlTransaction transac = null, string conStr = null)
        {
            DynamicParameters param = new DynamicParameters();

            param.Add("@COMPANY", d.company);
            param.Add("@AUDIT_NO", d.audit_no);
            param.Add("@SQNO", d.sqno);
            param.Add("@INPID", d.inpid);
            param.Add("@ASSETNO", d.assetno);

            param.Add("@UCODE", d.ucode);
            param.Add("@FLAG", d.flag);
            param.Add("@TRANSY", d.transy);
            param.Add("@REMARK", d.remark);

            sql = $"update TRACKPOSTTRN set " +
                  " SQNO = @SQNO ," +
                  " FLAG = @FLAG," +
                  " TRACKID = @UCODE," +
                  " TRANSDT = GETDATE()," +
                  " REMARK = @REMARK" +
                  " where COMPANY = @COMPANY" +
                  " and AUDIT_NO = @AUDIT_NO" +
                  " and INPID = @INPID" +
                  " and ASSETNO = @ASSETNO ";

            var res = ExecuteNonQuery(transac, sql, param);

            return(res);
        }
예제 #2
0
        public int Insert(TrackOfflineReq d, SqlTransaction transac = null, string conStr = null)
        {
            DynamicParameters param = new DynamicParameters();

            param.Add("@COMPANY", d.company);
            param.Add("@AUDIT_NO", d.audit_no);
            param.Add("@DEPCODEOL", d.depcodeol);
            param.Add("@INPID", d.inpid);
            param.Add("@INPDT", d.inpdt);
            param.Add("@ASSETNO", d.assetno);
            param.Add("@MEMO1", d.memo1);
            param.Add("@FLAG", d.flag);
            param.Add("@MEMO1", d.memo1);
            param.Add("@TRACKID", d.ucode);

            param.Add("@ASSETNAME", d.assetname);
            param.Add("@OFFICECODE", d.officecode);
            param.Add("@OFNAME", d.ofname);
            param.Add("@POSITNAME", d.positname);

            sql  = "insert into TRACKPOSTTRN";
            sql += " (COMPANY,AUDIT_NO,DEPCODEOL ";
            sql += " ,INPID,INPDT,ASSETNO,ASSETNAME,MEMO1,FLAG ";
            sql += " ,OFFICECODE,OFNAME,POSITNAME";
            sql += " ,TRACKID,TRACKDT)";
            sql += " values (@COMPANY,@AUDIT_NO,@DEPCODEOL ";
            sql += " ,@INPID,@INPDT,@ASSETNO,@ASSETNAME,@MEMO1,@FLAG";
            sql += " ,@OFFICECODE,@OFNAME,@POSITNAME";
            sql += " ,@TRACKID, GETDATE())";

            var res = ExecuteNonQuery(transac, sql, param, conStr);

            return(res);
        }
예제 #3
0
        public List <TrackPostTRNRes> GetData(TrackOfflineReq d, SqlTransaction transac = null, string conStr = null)
        {
            DynamicParameters param = new DynamicParameters();

            sql  = " select * from TRACKPOSTTRN";
            sql += " where 1 = 1";

            if (!String.IsNullOrEmpty(d.company))
            {
                sql += " and company = " + QuoteStr(d.company);
            }

            if (!String.IsNullOrEmpty(d.sqno))
            {
                sql += " and sqno = " + QuoteStr(d.sqno);
            }

            if (!String.IsNullOrEmpty(d.audit_no))
            {
                sql += " and audit_no = " + QuoteStr(d.audit_no);
            }

            if (!String.IsNullOrEmpty(d.inpid))
            {
                sql += " and inpid = " + QuoteStr(d.inpid);
            }

            sql += " order by flag,assetno";

            var res = Query <TrackPostTRNRes>(sql, param, conStr).ToList();

            return(res);
        }
예제 #4
0
        public List <TrackHDRes> GetData(TrackOfflineReq d, SqlTransaction transac = null, string conStr = null)
        {
            DynamicParameters param = new DynamicParameters();

            sql = $"select * from (" +
                  " select COMPANY, AUDIT_NO, INPID" +
                  " FROM[assetkkf].[dbo].[TRACKPOSTMST]" +
                  " UNION ALL" +
                  " select COMPANY, AUDIT_NO, INPID" +
                  " FROM[assetkkf].[dbo].[TRACKPOSTTRN]" +
                  " ) as Z";

            sql += " where 1 = 1";

            if (!String.IsNullOrEmpty(d.company))
            {
                sql += " and company = " + QuoteStr(d.company);
            }

            if (!String.IsNullOrEmpty(d.audit_no))
            {
                sql += " and audit_no = " + QuoteStr(d.audit_no);
            }

            if (!String.IsNullOrEmpty(d.inpid))
            {
                sql += " and inpid = " + QuoteStr(d.inpid);
            }

            sql += " group by COMPANY, AUDIT_NO, INPID ";

            var res = Query <TrackHDRes>(sql, param, conStr).ToList();

            return(res);
        }
예제 #5
0
        public ASAUDITPOSTTRN getASAUDITPOSTTRN(TrackOfflineReq d, SqlTransaction transac = null, string conStr = null)
        {
            DynamicParameters param = new DynamicParameters();

            sql  = " select * from FT_ASAUDITPOSTTRN_COMPANY(" + QuoteStr(d.company) + ")";
            sql += " where sqno = " + QuoteStr(d.sqno);
            sql += " and inpid = " + QuoteStr(d.inpid);
            sql += " and assetno = " + QuoteStr(d.assetno);
            var res = Query <ASAUDITPOSTTRN>(sql, param, conStr).FirstOrDefault();

            return(res);
        }
예제 #6
0
        public ASAUDITCUTDATEMST getASAUDITCUTDATEMST(TrackOfflineReq d, SqlTransaction transac = null, string conStr = null)
        {
            DynamicParameters param = new DynamicParameters();

            sql  = " select * from FT_ASAUDITCUTDATEMST_COMPANY(" + QuoteStr(d.company) + ")";
            sql += " where Audit_NO = " + QuoteStr(d.audit_no);
            sql += " and Audit_NO is not null";
            sql += " and FLAG not in ('X')";
            var res = Query <ASAUDITCUTDATEMST>(sql, param, conStr).FirstOrDefault();

            return(res);
        }