Ejemplo n.º 1
0
        public List <SelectCommonT_LoginDTO> SelectCommonT_Login(SelectCommonT_LoginProcDTO obj)
        {
            List <SelectCommonT_LoginDTO> commont_logindto = new List <SelectCommonT_LoginDTO>();

            using (DBlayer dblayer = new DBlayer())
            {
                SqlCommand cmd = new SqlCommand("sp_SelectCommonT_Login");
                cmd.CommandType = CommandType.StoredProcedure;
                cmd.Parameters.AddWithValue("@p_UserName", obj.UserName);
                cmd.Parameters.AddWithValue("@p_PassWord", obj.PassWord);
                commont_logindto = dblayer.GetEntityList <SelectCommonT_LoginDTO>(cmd);
            }
            return(commont_logindto);
        }
Ejemplo n.º 2
0
        public HttpResponseMessage SelectCommonT_Login(SelectCommonT_LoginProcDTO obj)
        {
            HttpResponseMessage message;

            try
            {
                CommonT_LoginDAL dal = new CommonT_LoginDAL();
                var dynobj           = new { result = dal.SelectCommonT_Login(obj) };
                message = Request.CreateResponse(HttpStatusCode.OK, dynobj);
            }
            catch (Exception ex)
            {
                message = Request.CreateResponse(HttpStatusCode.BadRequest, new { msgText = "something Wrong.Try Again!" });
            }
            return(message);
        }