Esempio n. 1
0
        public XElement CH_P_ESTBLSH_REG_INFO(
            int P_REG_ID
            )
        {
            try
            {
                /// Data Validations

                //if (String.IsNullOrEmpty(PI_1I))

                //throw new FaultException<ValidationFault>(new ValidationFault());

                using (TestBLL tbl = new TestBLL())
                {
                    return(tbl.CH_P_ESTBLSH_REG_INFO(
                               P_REG_ID
                               ));
                }
            }
            catch (FaultException <ValidationFault> e)
            {
                ValidationFault fault = new ValidationFault
                {
                    Result      = true,
                    Message     = "Parameter not correct",
                    Description = "Invalid Parameter Name or All Parameters are nullu"
                };

                throw new FaultException <ValidationFault>(
                          fault);
            }
            catch (Exception ex)
            {
                ValidationFault fault = new ValidationFault
                {
                    Result      = false,
                    Message     = ex.Message,
                    Description = "Service have an internal error please contact service administartor [email protected]"
                };

                throw new FaultException <ValidationFault>(fault);
            }
        }