Example #1
0
        public BaseOutPutTypeModels GetBaseOutPutTypeList(BaseOutPutTypeModels model)
        {
            string errorStr = "";

            string listQuery = " SELECT SEQNO , " + string.Join(",", column_BaseOutPutType) + " FROM conf_release_type  WHERE 1=1 ";

            if (!String.IsNullOrEmpty(model.schType))
            {
                listQuery += " AND NATION_CODE = '" + model.schType + "' ";
            }
            listQuery += " ORDER BY SEQNO ";

            DataTable listDt = getQueryResult(listQuery, out errorStr);

            if (listDt != null && listDt.Rows.Count != 0)
            {
                for (int i = 0; i < listDt.Rows.Count; i++)
                {
                    ConfReleaseType temp = new ConfReleaseType();
                    temp.SEQNO        = int.Parse(listDt.Rows[i]["SEQNO"].ToString().Trim());
                    temp.NATION_CODE  = listDt.Rows[i]["NATION_CODE"].ToString().Trim();
                    temp.RELEASE_NAME = listDt.Rows[i]["RELEASE_NAME"].ToString().Trim();
                    temp.RELEASE_CODE = listDt.Rows[i]["RELEASE_CODE"].ToString().Trim();
                    temp.MEMO         = listDt.Rows[i]["MEMO"].ToString().Trim();
                    temp.DELV_CODE    = listDt.Rows[i]["DELV_CODE"].ToString().Trim();
                    model.Items.Add(temp);
                }
            }

            return(model);
        }
Example #2
0
        public ConfReleaseType GetBaseOutPutTypeView(int SEQNO)
        {
            string errorStr = "";

            string listQuery = " SELECT SEQNO , " + string.Join(",", column_BaseOutPutType) + " FROM conf_release_type  WHERE SEQNO = " + SEQNO;

            DataTable listDt = getQueryResult(listQuery, out errorStr);

            ConfReleaseType model = new ConfReleaseType();

            if (listDt != null && listDt.Rows.Count != 0)
            {
                model.SEQNO        = int.Parse(listDt.Rows[0]["SEQNO"].ToString().Trim());
                model.NATION_CODE  = listDt.Rows[0]["NATION_CODE"].ToString().Trim();
                model.RELEASE_NAME = listDt.Rows[0]["RELEASE_NAME"].ToString().Trim();
                model.RELEASE_CODE = listDt.Rows[0]["RELEASE_CODE"].ToString().Trim();
                model.MEMO         = listDt.Rows[0]["MEMO"].ToString().Trim();
                model.DELV_CODE    = listDt.Rows[0]["DELV_CODE"].ToString().Trim();
            }

            return(model);
        }