Exemple #1
0
        public clsRegstrResponse ListContacts_Get()
        {
            clsRegstrResponse obj = new clsRegstrResponse();

            obj.objresponse = new clsResponse();
            try
            {
                DataTable dt = dlobj.ListContacts_Get();
                if (dt.Rows.Count > 0)
                {
                    obj.lstcontacts = dt.AsEnumerable().Select((drow) =>
                    {
                        return(new clsContactlist
                        {
                            UserName = drow.Field <string>("UserName"),
                            ContactNo = drow.Field <string>("ContactNO"),
                        });
                    }).ToList();

                    obj.objresponse.ResponseCode    = 1;
                    obj.objresponse.ResponseMessage = "Get contactlist Successfully";
                }
                else
                {
                    obj.objresponse.ResponseCode    = 0;
                    obj.objresponse.ResponseMessage = "Error Occured";
                }
            }
            catch (Exception ex)
            {
                obj.objresponse.ResponseCode    = -1;
                obj.objresponse.ResponseMessage = "Error Occured :" + ex.ToString();
            }
            return(obj);
        }
Exemple #2
0
        public clsRegstrResponse Register_Add(clsRegistration obj)
        {
            clsRegstrResponse objrgstresponse = new clsRegstrResponse();
            clsRegistration   objregister     = new clsRegistration();

            int i = dlobj.Register_Add(obj);

            if (i > 0)
            {
                objrgstresponse.objresponse = new clsResponse()
                {
                    ResponseCode    = 100,
                    ResponseMessage = "Authentication Success"
                };
            }
            else
            {
                objrgstresponse.objresponse = new clsResponse()
                {
                    ResponseCode    = 101,
                    ResponseMessage = "Authentication Fail"
                };
            }
            return(objrgstresponse);
        }
Exemple #3
0
        public clsRegstrResponse ListContacts_Get()
        {
            clsRegstrResponse objresponse = objbl.ListContacts_Get();

            return(objresponse);
        }
Exemple #4
0
        public clsRegstrResponse Registarion_ADD(clsRegistration obj)
        {
            clsRegstrResponse objresponse = objbl.Register_Add(obj);

            return(objresponse);
        }