Пример #1
0
        public static A2ZCOLLGROUPDTO GetInformation(int BranchNo, int RegNo, int SubRegNo)
        {
            DataTable dt       = new DataTable();
            string    strQuery = "SELECT * FROM A2ZCOLLGROUP WHERE  BranchNo='" + BranchNo + "' AND  RegNo='" + RegNo + "' AND  SubRegNo='" + SubRegNo + "'";

            dt = BLL.CommonManager.Instance.GetDataTableByQuery(strQuery, "A2ZACGMS");



            var p = new A2ZCOLLGROUPDTO();

            if (dt.Rows.Count > 0)
            {
                p.RegNo    = Converter.GetInteger(dt.Rows[0]["RegNo"]);
                p.SubRegNo = Converter.GetInteger(dt.Rows[0]["SubRegNo"]);

                p.ColNo = Converter.GetInteger(dt.Rows[0]["ColNo"]);


                return(p);
            }
            p.RegNo = 0;

            return(p);
        }
Пример #2
0
        public static int UpdateInformation(A2ZCOLLGROUPDTO dto)
        {
            int    rowEffect = 0;
            string strQuery  = "UPDATE A2ZCOLLGROUP set BranchNo='" + dto.BranchNo + "', RegNo='" + dto.RegNo + "',SubRegNo='" + dto.SubRegNo + "',ColNo='" + dto.ColNo + "'";

            rowEffect = Converter.GetInteger(BLL.CommonManager.Instance.ExecuteNonQuery(strQuery, "A2ZACGMS"));
            if (rowEffect == 0)
            {
                return(0);
            }
            else
            {
                return(1);
            }
        }
Пример #3
0
        public static int InsertInformation(A2ZCOLLGROUPDTO dto)
        {
            int    rowEffect = 0;
            string strQuery  = @"INSERT into A2ZCOLLGROUP(BranchNo,REGNO,SUBREGNO,COLNO)values('" + dto.BranchNo + "','" + dto.RegNo + "','" + dto.SubRegNo + "','" + dto.ColNo + "')";

            rowEffect = Converter.GetInteger(BLL.CommonManager.Instance.ExecuteNonQuery(strQuery, "A2ZACGMS"));

            if (rowEffect == 0)
            {
                return(0);
            }
            else
            {
                return(1);
            }
        }