public bool addContractDetail(ContractDetail c)
        {
            try
               {
               int param = 2;

               string[] name = new string[param];
               object[] value = new object[param];

               name[0] = "@contractid"; value[0] = c.Contractid;
               name[1] = "@serviceid"; value[1] = c.Serviceid;

               int result = this.Update("contractDetail_Insert", name, value, param);
               if (result != 0)
               {
                   return true;
               }
               }
               catch (System.Exception ex)
               {
               Console.WriteLine("Message = {1}", ex.Message);
               }

               return false;
        }
 public DataTable searchContractDetail(ContractDetail ctrd)
 {
     return contractDAT.searchContractDetail(ctrd);
 }
 public bool addContractDetail(ContractDetail c)
 {
     return contractDetailDAT.addContractDetail(c);
 }
        public DataTable searchContractDetail(ContractDetail ctrd)
        {
            try
            {
                string[] names = new string[4];
                object[] values = new object[4];

                names[0] = "@p_ID"; values[0] = ctrd.Id;
                names[1] = "@p_CONTRACTID"; values[1] = ctrd.Contractid;
                names[2] = "@p_SERVICEID"; values[2] = ctrd.Serviceid;
                names[3] = "@p_TOP"; values[3] = 0;

                return this.ExcuteStoreProcedure("CONTRACTDETAIL_Search", names, values);
            }
            catch (System.Exception ex)
            {
                Console.WriteLine("Message = {1}", ex.Message);
            }

            return null;
        }