Example #1
0
        public HttpResponseMessage ModifyCommonT_Login(ModifyCommonT_LoginDTO obj)
        {
            HttpResponseMessage message;

            try
            {
                CommonT_LoginDAL dal = new CommonT_LoginDAL();
                var dynobj           = new { result = dal.ModifyCommonT_Login(obj) };
                message = Request.CreateResponse(HttpStatusCode.OK, dynobj);
            }
            catch (Exception ex)
            {
                message = Request.CreateResponse(HttpStatusCode.BadRequest, new { msgText = "something Wrong.Try Again!" });
            }
            return(message);
        }
Example #2
0
        public bool ModifyCommonT_Login(ModifyCommonT_LoginDTO obj)
        {
            bool       res = false;
            SqlCommand cmd = new SqlCommand("sp_ModifyCommonT_Login");

            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@p_Id", obj.Id);
            cmd.Parameters.AddWithValue("@p_Name", obj.Name);
            cmd.Parameters.AddWithValue("@p_UserName", obj.UserName);
            cmd.Parameters.AddWithValue("@p_PassWord", obj.PassWord);
            cmd.Parameters.AddWithValue("@p_Role", obj.Role);
            cmd.Parameters.AddWithValue("@p_Active", obj.Active);
            int result = new DBlayer().ExecuteNonQuery(cmd);

            if (result != Int32.MaxValue)
            {
                res = true;
            }
            return(res);
        }