Пример #1
0
        private bool CheckUse(MSTS01P001Model dto)
        {
            string strSQL = @" SELECT COUNT(*)
                                FROM VSMS_ISSUE A JOIN VSMS_MANDAY S
                                ON A.COM_CODE = S.COM_CODE
                                AND A.DEFECT = S.ISSUE_TYPE 
                                WHERE A.COM_CODE = @COM_CODE
                                AND A.DEFECT = @DEFECT";

            var parameters = CreateParameter();

            parameters.AddParameter("COM_CODE", dto.COM_CODE); //checked
            parameters.AddParameter("DEFECT", dto.ISSUE_TYPE);

            // var result = _DBMangerNoEF.ExecuteNonQuery(strSQL, parameters, CommandType.Text);
            var result = _DBMangerNoEF.ExecuteDataSet(strSQL, parameters, commandType: CommandType.Text);

            bool   isUse;
            string AA = string.Empty;

            if (result.Status)
            {
                AA = result.OutputDataSet.Tables[0].Rows[0][0].AsString();
            }

            if (AA == "0")
            {
                isUse = false;
            }
            else
            {
                isUse = true;
            }

            return(isUse);
        }
Пример #2
0
 public MSTS01P001DTO()
 {
     Model = new MSTS01P001Model();   // new โมเดล
 }