예제 #1
0
        public int f_insert(v_bhytct obj)
        {
            int result = 0;

            try
            {
                string userid = AccessData.m_userid;
                //PHAU THUAT KTC
                sql  = "insert into " + schema + ".v_bhytktc(ID,STT,MADOITUONG,MAVP,SOLUONG,DONGIA,";
                sql += "GIAMUA,BHYTTRA,GIA_BH,MIEN,NGAYUD,ID_KTCAO,IDNHOMBHYT) values ";
                sql += "({ID},{STT},{MADOITUONG},{MAVP},{SOLUONG},{DONGIA},";
                sql += "{GIAMUA},{BHYTTRA},{GIA_BH},{MIEN},{NGAYUD},{ID_KTCAO},{IDNHOMBHYT})";


                sql = sql.Replace("{ID}", obj.ID.ToString());
                sql = sql.Replace("{STT}", obj.STT.ToString());
                sql = sql.Replace("{MADOITUONG}", obj.MADOITUONG.ToString());
                sql = sql.Replace("{MAVP}", obj.MAVP.ToString());
                sql = sql.Replace("{SOLUONG}", obj.SOLUONG.ToString());
                sql = sql.Replace("{DONGIA}", obj.DONGIA.ToString());
                sql = sql.Replace("{BHYTTRA}", obj.BHYTTRA.ToString());
                sql = sql.Replace("{GIA_BH}", obj.GIA_BH.ToString());
                sql = sql.Replace("{GIAMUA}", obj.GIAMUA.ToString());
                sql = sql.Replace("{MIEN}", obj.MIEN.ToString());
                sql = sql.Replace("{NGAYUD}", m_format.f_formatdata(obj.NGAYUD.ToString(), "date"));
                sql = sql.Replace("{ID_KTCAO}", obj.ID_KTCAO.ToString());
                sql = sql.Replace("{IDNHOMBHYT}", obj.IDNHOMBHYT.ToString());

                result = OracleData.f_execute_data(sql);
            }
            catch
            {
            }
            return(result);
        }
예제 #2
0
        public int f_insert(v_bhytct obj)
        {
            int result = 0;

            try
            {
            }
            catch
            {
            }
            return(result);
        }
예제 #3
0
        public int f_insert(v_bhytct obj)
        {
            int result = 0;

            try
            {
                string userid = AccessData.m_userid;
                //PHAU THUAT KTC
                sql  = "insert into " + schema + ".v_bhytct(ID,STT,NGAY,MAKP,MADOITUONG,MAVP,SOLUONG,DONGIA,VAT,VATTU,SOTIEN,SOTHE,";
                sql += "GIAMUA,TRA,NGAYTRA,BHYTDUYET,BHYTTRA,IDTONGHOP,MAKPTHUCHIEN,GIA_BH,MIEN,MABS,NGAYUD,ID_KTCAO,IDNHOMBHYT,TILE) values ";
                sql += "({ID},{STT},{NGAY},{MAKP},{MADOITUONG},{MAVP},{SOLUONG},{DONGIA},{VAT},{VATTU},{SOTIEN},{SOTHE},";
                sql += "{GIAMUA},{TRA},{NGAYTRA},{BHYTDUYET},{BHYTTRA},{IDTONGHOP},{MAKPTHUCHIEN},{GIA_BH},{MIEN},{MABS},{NGAYUD},{ID_KTCAO},{IDNHOMBHYT},{TILE})";


                sql = sql.Replace("{ID}", obj.ID.ToString());
                sql = sql.Replace("{STT}", obj.STT.ToString());
                sql = sql.Replace("{NGAY}", m_format.f_formatdata(obj.NGAY.ToString(), "date"));
                sql = sql.Replace("{MAKP}", m_format.f_formatdata(obj.MAKP.ToString()));
                sql = sql.Replace("{MADOITUONG}", obj.MADOITUONG.ToString());
                sql = sql.Replace("{MAVP}", obj.MAVP.ToString());
                sql = sql.Replace("{SOLUONG}", obj.SOLUONG.ToString());
                sql = sql.Replace("{DONGIA}", obj.DONGIA.ToString());
                sql = sql.Replace("{VAT}", obj.VAT.ToString());
                sql = sql.Replace("{VATTU}", obj.VATTU.ToString());
                sql = sql.Replace("{SOTIEN}", obj.SOTIEN.ToString());
                sql = sql.Replace("{SOTHE}", m_format.f_formatdata(obj.SOTHE.ToString()));
                sql = sql.Replace("{GIAMUA}", obj.GIAMUA.ToString());
                sql = sql.Replace("{TRA}", obj.TRA.ToString());
                sql = sql.Replace("{NGAYTRA}", m_format.f_formatdata(obj.NGAYTRA.ToString(), "date"));
                sql = sql.Replace("{BHYTDUYET}", obj.BHYTDUYET.ToString());
                sql = sql.Replace("{BHYTTRA}", obj.BHYTTRA.ToString());

                sql = sql.Replace("{IDTONGHOP}", obj.IDTONGHOP.ToString());
                sql = sql.Replace("{MAKPTHUCHIEN}", m_format.f_formatdata(obj.MAKPTHUCHIEN.ToString()));
                sql = sql.Replace("{GIA_BH}", obj.GIA_BH.ToString());
                sql = sql.Replace("{MIEN}", obj.MIEN.ToString());
                sql = sql.Replace("{MABS}", m_format.f_formatdata(obj.MABS.ToString()));
                sql = sql.Replace("{NGAYUD}", m_format.f_formatdata(obj.NGAYUD.ToString(), "date"));
                sql = sql.Replace("{ID_KTCAO}", obj.ID_KTCAO.ToString());
                sql = sql.Replace("{IDNHOMBHYT}", obj.IDNHOMBHYT.ToString());
                sql = sql.Replace("{TILE}", obj.Tile);

                result = OracleData.f_execute_data(sql);
            }
            catch
            {
            }
            return(result);
        }