Exemplo n.º 1
0
        /// <summary>
        /// ID CODE 互查
        /// </summary>
        /// <param name="strID"></param>
        /// <param name="bd"></param>
        /// <param name="codeorid"></param>
        /// <returns></returns>
        public override string GetCodeorID(string strID, BaseData bd, string codeorid)
        {
            string sqlstr = string.Empty;

            if (codeorid == "id")
            {
                sqlstr = "select isnull(id,'') from rdrecord01  with(nolock)  where ccode='" + strID + "'";
            }
            if (codeorid == "code")
            {
                sqlstr = "select isnull(ccode,'') from rdrecord01  with(nolock)  where id='" + strID + "'";
            }
            Model.APIData apidata = bd as Model.APIData;

            DBUtility.DbHelperSQLP sqlp = new DBUtility.DbHelperSQLP(apidata.ConnectInfo.Constring);
            string ret = sqlp.GetSingle(sqlstr).NullToString();

            BLL.Common.ErrorMsg(ret, "未能获采购入库单ID或单号");
            return(ret);
        }
Exemplo n.º 2
0
        /// <summary>
        /// ID CODE 互查
        /// </summary>
        /// <param name="strID"></param>
        /// <param name="bd"></param>
        /// <param name="codeorid"></param>
        /// <returns></returns>
        public override string GetCodeorID(string strID, BaseData bd, string codeorid)
        {
            string sqlstr = string.Empty;

            if (codeorid == "id")
            {
                sqlstr = "select isnull(WorkHrId,'') from Sfc_workhrnote  with(nolock)  where " + sourceVoucherNoColumnName + " ='" + strID + "'";
            }
            if (codeorid == "code")
            {
                sqlstr = "select isnull(" + sourceVoucherNoColumnName + ",'') from Sfc_workhrnote  with(nolock)  where WorkHrId ='" + strID + "'";
            }
            Model.APIData apidata = bd as Model.APIData;

            DBUtility.DbHelperSQLP sqlp = new DBUtility.DbHelperSQLP(apidata.ConnectInfo.Constring);
            string ret = sqlp.GetSingle(sqlstr).NullToString();

            BLL.Common.ErrorMsg(ret, "未能获取" + voucherTypeName + "ID或单号");
            return(ret);
        }
Exemplo n.º 3
0
        /// <summary>
        /// ID CODE 互查
        /// </summary>
        /// <param name="strID"></param>
        /// <param name="bd"></param>
        /// <param name="codeorid"></param>
        /// <returns></returns>
        public override string GetCodeorID(string strID, BaseData bd, string codeorid)
        {
            string sqlstr = string.Empty;

            if (codeorid == "id")
            {
                sqlstr = "select isnull(id,'') from PU_ArrivalVouch  with(nolock)  where " + targetVoucherNoColumnName + "='" + strID + "'";
            }
            if (codeorid == "code")
            {
                sqlstr = "select isnull(" + targetVoucherNoColumnName + ",'') from PU_ArrivalVouch  with(nolock)  where id ='" + strID + "'";
            }
            Model.APIData apidata = bd as Model.APIData;

            DBUtility.DbHelperSQLP sqlp = new DBUtility.DbHelperSQLP(apidata.ConnectInfo.Constring);
            string ret = sqlp.GetSingle(sqlstr).NullToString();

            ApiService.BLL.Common.ErrorMsg(ret, "未能获采购退货单ID或单号");
            return(ret);
        }
Exemplo n.º 4
0
        /// <summary>
        /// ID CODE 互查
        /// </summary>
        /// <param name="strID"></param>
        /// <param name="bd"></param>
        /// <param name="codeorid"></param>
        /// <returns></returns>
        public override string GetCodeorID(string strID, BaseData bd, string codeorid)
        {
            string sqlstr = string.Empty;

            if (codeorid == "id")
            {
                sqlstr = "select isnull(dlid,'') from DispatchList  with(nolock)  where cdlcode ='" + strID + "'  and cvouchtype = '05' ";
            }
            if (codeorid == "code")
            {
                sqlstr = "select isnull(cdlcode,'') from DispatchList  with(nolock)  where dlid ='" + strID + "'  and cvouchtype = '05'  ";
            }
            Model.APIData apidata = bd as Model.APIData;

            DBUtility.DbHelperSQLP sqlp = new DBUtility.DbHelperSQLP(apidata.ConnectInfo.Constring);
            string ret = sqlp.GetSingle(sqlstr).NullToString();

            ApiService.BLL.Common.ErrorMsg(ret, "未能获销售退货单ID或单号");
            return(ret);
        }